@golstats/gsc-next-rivals 1.1.0 → 1.1.1
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/README.md +2 -2
- package/dist/css/fonts.css +127 -127
- package/dist/gsc-next-rivals.es.js +129 -141
- package/dist/gsc-next-rivals.umd.js +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
# gsc-next-rivals
|
|
2
|
-
Seccion de selecciones para mostrar proximo rivales a jugar
|
|
1
|
+
# gsc-next-rivals
|
|
2
|
+
Seccion de selecciones para mostrar proximo rivales a jugar
|
package/dist/css/fonts.css
CHANGED
|
@@ -1,127 +1,127 @@
|
|
|
1
|
-
@font-face {
|
|
2
|
-
font-family: 'Poppins-Black';
|
|
3
|
-
src: url('/fonts/Poppins-Black.otf') format('opentype');
|
|
4
|
-
}
|
|
5
|
-
@font-face {
|
|
6
|
-
font-family: 'Poppins-BlackItalic';
|
|
7
|
-
src: url('/fonts/Poppins-BlackItalic.otf') format('opentype');
|
|
8
|
-
}
|
|
9
|
-
@font-face {
|
|
10
|
-
font-family: 'Poppins-Bold';
|
|
11
|
-
src: url('/fonts/Poppins-Bold.otf') format('opentype');
|
|
12
|
-
}
|
|
13
|
-
@font-face {
|
|
14
|
-
font-family: 'Poppins-BoldItalic';
|
|
15
|
-
src: url('/fonts/Poppins-BoldItalic.otf') format('opentype');
|
|
16
|
-
}
|
|
17
|
-
@font-face {
|
|
18
|
-
font-family: 'Poppins-ExtraBold';
|
|
19
|
-
src: url('/fonts/Poppins-ExtraBold.otf') format('opentype');
|
|
20
|
-
}
|
|
21
|
-
@font-face {
|
|
22
|
-
font-family: 'Poppins-ExtraBoldItalic';
|
|
23
|
-
src: url('/fonts/Poppins-ExtraBoldItalic.otf') format('opentype');
|
|
24
|
-
}
|
|
25
|
-
@font-face {
|
|
26
|
-
font-family: 'Poppins-ExtraLight';
|
|
27
|
-
src: url('/fonts/Poppins-ExtraLight.otf') format('opentype');
|
|
28
|
-
}
|
|
29
|
-
@font-face {
|
|
30
|
-
font-family: 'Poppins-ExtraLightItalic';
|
|
31
|
-
src: url('/fonts/Poppins-ExtraLightItalic.otf') format('opentype');
|
|
32
|
-
}
|
|
33
|
-
@font-face {
|
|
34
|
-
font-family: 'Poppins-Italic';
|
|
35
|
-
src: url('/fonts/Poppins-Italic.otf') format('opentype');
|
|
36
|
-
}
|
|
37
|
-
@font-face {
|
|
38
|
-
font-family: 'Poppins-Light';
|
|
39
|
-
src: url('/fonts/Poppins-Light.otf') format('opentype');
|
|
40
|
-
}
|
|
41
|
-
@font-face {
|
|
42
|
-
font-family: 'Poppins-LightItalic';
|
|
43
|
-
src: url('/fonts/Poppins-LightItalic.otf') format('opentype');
|
|
44
|
-
}
|
|
45
|
-
@font-face {
|
|
46
|
-
font-family: 'Poppins-MediumItalic';
|
|
47
|
-
src: url('/fonts/Poppins-MediumItalic.otf') format('opentype');
|
|
48
|
-
}
|
|
49
|
-
@font-face {
|
|
50
|
-
font-family: 'Poppins-Medium';
|
|
51
|
-
src: url('/fonts/Poppins-Medium.otf') format('opentype');
|
|
52
|
-
}
|
|
53
|
-
@font-face {
|
|
54
|
-
font-family: 'Poppins-Regular';
|
|
55
|
-
src: url('/fonts/Poppins-Regular.otf') format('opentype');
|
|
56
|
-
}
|
|
57
|
-
@font-face {
|
|
58
|
-
font-family: 'Poppins-SemiBold';
|
|
59
|
-
src: url('/fonts/Poppins-SemiBold.otf') format('opentype');
|
|
60
|
-
}
|
|
61
|
-
@font-face {
|
|
62
|
-
font-family: 'Poppins-SemiBoldItalic';
|
|
63
|
-
src: url('/fonts/Poppins-SemiBoldItalic.otf') format('opentype');
|
|
64
|
-
}
|
|
65
|
-
@font-face {
|
|
66
|
-
font-family: 'Poppins-ThinItalic';
|
|
67
|
-
src: url('/fonts/Poppins-ThinItalic.otf') format('opentype');
|
|
68
|
-
}
|
|
69
|
-
@font-face {
|
|
70
|
-
font-family: 'Poppins-Thin';
|
|
71
|
-
src: url('/fonts/Poppins-Thin.otf') format('opentype');
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
@font-face {
|
|
75
|
-
font-family: 'Montserrat-SemiBold';
|
|
76
|
-
src: url('/fonts/Montserrat-SemiBold.otf') format('opentype');
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
@font-face {
|
|
80
|
-
font-family: 'Oswald-Bold';
|
|
81
|
-
src: url('/fonts/Oswald-Bold.ttf') format('truetype');
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
@font-face {
|
|
85
|
-
font-family: 'Oswald-Regular';
|
|
86
|
-
src: url('/fonts/Oswald-Regular.ttf') format('truetype');
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
@font-face {
|
|
90
|
-
font-family: 'Oswald-SemiBold';
|
|
91
|
-
src: url('/fonts/Oswald-SemiBold.ttf') format('truetype');
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
@font-face {
|
|
95
|
-
font-family: 'Oswald-Medium';
|
|
96
|
-
src: url('/fonts/Oswald-Medium.ttf') format('truetype');
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
@font-face {
|
|
100
|
-
font-family: 'BebasNeueBold';
|
|
101
|
-
src: url('/fonts/BebasNeue-Bold.woff2') format('woff2');
|
|
102
|
-
/* También puedes proporcionar otros formatos de fuente como woff, ttf, etc., para una mejor compatibilidad entre navegadores */
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
@font-face {
|
|
106
|
-
font-family: 'BebasNeueBook';
|
|
107
|
-
src: url('/fonts/BebasNeue-Book.woff2') format('woff2');
|
|
108
|
-
/* También puedes proporcionar otros formatos de fuente como woff, ttf, etc., para una mejor compatibilidad entre navegadores */
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
@font-face {
|
|
112
|
-
font-family: 'BebasNeueLight';
|
|
113
|
-
src: url('/fonts/BebasNeue-Light.woff2') format('woff2');
|
|
114
|
-
/* También puedes proporcionar otros formatos de fuente como woff, ttf, etc., para una mejor compatibilidad entre navegadores */
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
@font-face {
|
|
118
|
-
font-family: 'BebasNeueRegular';
|
|
119
|
-
src: url('/fonts/BebasNeue-Regular.woff2') format('woff2');
|
|
120
|
-
/* También puedes proporcionar otros formatos de fuente como woff, ttf, etc., para una mejor compatibilidad entre navegadores */
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
@font-face {
|
|
124
|
-
font-family: 'BebasNeueThin';
|
|
125
|
-
src: url('/fonts/BebasNeue-Thin.woff2') format('woff2');
|
|
126
|
-
/* También puedes proporcionar otros formatos de fuente como woff, ttf, etc., para una mejor compatibilidad entre navegadores */
|
|
127
|
-
}
|
|
1
|
+
@font-face {
|
|
2
|
+
font-family: 'Poppins-Black';
|
|
3
|
+
src: url('/fonts/Poppins-Black.otf') format('opentype');
|
|
4
|
+
}
|
|
5
|
+
@font-face {
|
|
6
|
+
font-family: 'Poppins-BlackItalic';
|
|
7
|
+
src: url('/fonts/Poppins-BlackItalic.otf') format('opentype');
|
|
8
|
+
}
|
|
9
|
+
@font-face {
|
|
10
|
+
font-family: 'Poppins-Bold';
|
|
11
|
+
src: url('/fonts/Poppins-Bold.otf') format('opentype');
|
|
12
|
+
}
|
|
13
|
+
@font-face {
|
|
14
|
+
font-family: 'Poppins-BoldItalic';
|
|
15
|
+
src: url('/fonts/Poppins-BoldItalic.otf') format('opentype');
|
|
16
|
+
}
|
|
17
|
+
@font-face {
|
|
18
|
+
font-family: 'Poppins-ExtraBold';
|
|
19
|
+
src: url('/fonts/Poppins-ExtraBold.otf') format('opentype');
|
|
20
|
+
}
|
|
21
|
+
@font-face {
|
|
22
|
+
font-family: 'Poppins-ExtraBoldItalic';
|
|
23
|
+
src: url('/fonts/Poppins-ExtraBoldItalic.otf') format('opentype');
|
|
24
|
+
}
|
|
25
|
+
@font-face {
|
|
26
|
+
font-family: 'Poppins-ExtraLight';
|
|
27
|
+
src: url('/fonts/Poppins-ExtraLight.otf') format('opentype');
|
|
28
|
+
}
|
|
29
|
+
@font-face {
|
|
30
|
+
font-family: 'Poppins-ExtraLightItalic';
|
|
31
|
+
src: url('/fonts/Poppins-ExtraLightItalic.otf') format('opentype');
|
|
32
|
+
}
|
|
33
|
+
@font-face {
|
|
34
|
+
font-family: 'Poppins-Italic';
|
|
35
|
+
src: url('/fonts/Poppins-Italic.otf') format('opentype');
|
|
36
|
+
}
|
|
37
|
+
@font-face {
|
|
38
|
+
font-family: 'Poppins-Light';
|
|
39
|
+
src: url('/fonts/Poppins-Light.otf') format('opentype');
|
|
40
|
+
}
|
|
41
|
+
@font-face {
|
|
42
|
+
font-family: 'Poppins-LightItalic';
|
|
43
|
+
src: url('/fonts/Poppins-LightItalic.otf') format('opentype');
|
|
44
|
+
}
|
|
45
|
+
@font-face {
|
|
46
|
+
font-family: 'Poppins-MediumItalic';
|
|
47
|
+
src: url('/fonts/Poppins-MediumItalic.otf') format('opentype');
|
|
48
|
+
}
|
|
49
|
+
@font-face {
|
|
50
|
+
font-family: 'Poppins-Medium';
|
|
51
|
+
src: url('/fonts/Poppins-Medium.otf') format('opentype');
|
|
52
|
+
}
|
|
53
|
+
@font-face {
|
|
54
|
+
font-family: 'Poppins-Regular';
|
|
55
|
+
src: url('/fonts/Poppins-Regular.otf') format('opentype');
|
|
56
|
+
}
|
|
57
|
+
@font-face {
|
|
58
|
+
font-family: 'Poppins-SemiBold';
|
|
59
|
+
src: url('/fonts/Poppins-SemiBold.otf') format('opentype');
|
|
60
|
+
}
|
|
61
|
+
@font-face {
|
|
62
|
+
font-family: 'Poppins-SemiBoldItalic';
|
|
63
|
+
src: url('/fonts/Poppins-SemiBoldItalic.otf') format('opentype');
|
|
64
|
+
}
|
|
65
|
+
@font-face {
|
|
66
|
+
font-family: 'Poppins-ThinItalic';
|
|
67
|
+
src: url('/fonts/Poppins-ThinItalic.otf') format('opentype');
|
|
68
|
+
}
|
|
69
|
+
@font-face {
|
|
70
|
+
font-family: 'Poppins-Thin';
|
|
71
|
+
src: url('/fonts/Poppins-Thin.otf') format('opentype');
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
@font-face {
|
|
75
|
+
font-family: 'Montserrat-SemiBold';
|
|
76
|
+
src: url('/fonts/Montserrat-SemiBold.otf') format('opentype');
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
@font-face {
|
|
80
|
+
font-family: 'Oswald-Bold';
|
|
81
|
+
src: url('/fonts/Oswald-Bold.ttf') format('truetype');
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
@font-face {
|
|
85
|
+
font-family: 'Oswald-Regular';
|
|
86
|
+
src: url('/fonts/Oswald-Regular.ttf') format('truetype');
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
@font-face {
|
|
90
|
+
font-family: 'Oswald-SemiBold';
|
|
91
|
+
src: url('/fonts/Oswald-SemiBold.ttf') format('truetype');
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
@font-face {
|
|
95
|
+
font-family: 'Oswald-Medium';
|
|
96
|
+
src: url('/fonts/Oswald-Medium.ttf') format('truetype');
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
@font-face {
|
|
100
|
+
font-family: 'BebasNeueBold';
|
|
101
|
+
src: url('/fonts/BebasNeue-Bold.woff2') format('woff2');
|
|
102
|
+
/* También puedes proporcionar otros formatos de fuente como woff, ttf, etc., para una mejor compatibilidad entre navegadores */
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
@font-face {
|
|
106
|
+
font-family: 'BebasNeueBook';
|
|
107
|
+
src: url('/fonts/BebasNeue-Book.woff2') format('woff2');
|
|
108
|
+
/* También puedes proporcionar otros formatos de fuente como woff, ttf, etc., para una mejor compatibilidad entre navegadores */
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
@font-face {
|
|
112
|
+
font-family: 'BebasNeueLight';
|
|
113
|
+
src: url('/fonts/BebasNeue-Light.woff2') format('woff2');
|
|
114
|
+
/* También puedes proporcionar otros formatos de fuente como woff, ttf, etc., para una mejor compatibilidad entre navegadores */
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
@font-face {
|
|
118
|
+
font-family: 'BebasNeueRegular';
|
|
119
|
+
src: url('/fonts/BebasNeue-Regular.woff2') format('woff2');
|
|
120
|
+
/* También puedes proporcionar otros formatos de fuente como woff, ttf, etc., para una mejor compatibilidad entre navegadores */
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
@font-face {
|
|
124
|
+
font-family: 'BebasNeueThin';
|
|
125
|
+
src: url('/fonts/BebasNeue-Thin.woff2') format('woff2');
|
|
126
|
+
/* También puedes proporcionar otros formatos de fuente como woff, ttf, etc., para una mejor compatibilidad entre navegadores */
|
|
127
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
const
|
|
1
|
+
import { createElementBlock as u, openBlock as d, createElementVNode as l, normalizeStyle as h, toDisplayString as b, ref as y, watch as z, computed as x, onMounted as E, onBeforeMount as q, createVNode as F, renderSlot as P, normalizeClass as R, Transition as K, withCtx as W, withDirectives as L, createCommentVNode as w, Fragment as J, renderList as M, vShow as D, unref as O, useCssVars as Q, pushScopeId as U, popScopeId as G, onUnmounted as tt, mergeProps as et, createBlock as ot } from "vue";
|
|
2
|
+
const H = (e, o) => {
|
|
3
3
|
const t = e.__vccOpts || e;
|
|
4
4
|
for (const [i, c] of o)
|
|
5
5
|
t[i] = c;
|
|
@@ -30,28 +30,38 @@ const G = (e, o) => {
|
|
|
30
30
|
function i() {
|
|
31
31
|
o("click-rival", t.rival);
|
|
32
32
|
}
|
|
33
|
-
return (c,
|
|
33
|
+
return (c, r) => (d(), u("div", {
|
|
34
34
|
class: "team-card",
|
|
35
35
|
onClick: i
|
|
36
36
|
}, [
|
|
37
|
-
|
|
37
|
+
l("div", {
|
|
38
38
|
class: "team-card__bg-image",
|
|
39
|
-
style:
|
|
39
|
+
style: h({ "background-image": `url(${e.logo})` })
|
|
40
40
|
}, null, 4),
|
|
41
|
-
|
|
41
|
+
l("img", {
|
|
42
42
|
class: "team-card__image",
|
|
43
43
|
src: e.logo,
|
|
44
44
|
alt: e.name
|
|
45
45
|
}, null, 8, it),
|
|
46
|
-
|
|
46
|
+
l("p", rt, b(e.name), 1)
|
|
47
47
|
]));
|
|
48
48
|
}
|
|
49
|
-
}, lt = /* @__PURE__ */
|
|
49
|
+
}, lt = /* @__PURE__ */ H(at, [["__scopeId", "data-v-8f13b2f7"]]);
|
|
50
|
+
function nt(e, o) {
|
|
51
|
+
if (!o || o <= 1)
|
|
52
|
+
return e;
|
|
53
|
+
const t = new URL(e), i = t.pathname.split("/").filter((m) => m !== "");
|
|
54
|
+
if (i.length === 0)
|
|
55
|
+
return e;
|
|
56
|
+
const [c, ...r] = i, n = [c, o, ...r].join("/");
|
|
57
|
+
return `${t.origin}/${n}${t.search}`;
|
|
58
|
+
}
|
|
59
|
+
const st = (e, o) => {
|
|
50
60
|
const t = e.__vccOpts || e;
|
|
51
61
|
for (const [i, c] of o)
|
|
52
62
|
t[i] = c;
|
|
53
63
|
return t;
|
|
54
|
-
},
|
|
64
|
+
}, V = {
|
|
55
65
|
props: {
|
|
56
66
|
type: { type: Number, default: 0 },
|
|
57
67
|
value: { type: Boolean, default: !1 },
|
|
@@ -125,7 +135,7 @@ const G = (e, o) => {
|
|
|
125
135
|
this.$emit("click", e), this.typeOnOff && (this.status = !this.status, this.$emit("status", this.status));
|
|
126
136
|
}
|
|
127
137
|
}
|
|
128
|
-
},
|
|
138
|
+
}, A = () => {
|
|
129
139
|
Q((e) => ({
|
|
130
140
|
"9d01acb4": e.height,
|
|
131
141
|
"14e95081": e.borderWidthBtn,
|
|
@@ -141,61 +151,54 @@ const G = (e, o) => {
|
|
|
141
151
|
"93b87770": e.marginLeftStat,
|
|
142
152
|
c7f7beba: e.fontSizeStat
|
|
143
153
|
}));
|
|
144
|
-
},
|
|
145
|
-
|
|
146
|
-
const
|
|
154
|
+
}, j = V.setup;
|
|
155
|
+
V.setup = j ? (e, o) => (A(), j(e, o)) : A;
|
|
156
|
+
const dt = (e) => (U("data-v-f3ee6b2b"), e = e(), G(), e), ut = ["src"], ct = {
|
|
147
157
|
key: 1,
|
|
148
158
|
class: "text"
|
|
149
|
-
},
|
|
159
|
+
}, pt = ["src"], ft = { class: "stats" }, mt = /* @__PURE__ */ dt(() => /* @__PURE__ */ l("img", {
|
|
150
160
|
class: "iconstats",
|
|
151
161
|
src: "https://golstatsimages.blob.core.windows.net/todoelfut/playdes.png"
|
|
152
|
-
}, null, -1)),
|
|
153
|
-
function
|
|
154
|
-
return
|
|
155
|
-
t.type == 0 ? (
|
|
162
|
+
}, null, -1)), gt = { class: "numstats" }, yt = { class: "leyend" };
|
|
163
|
+
function ht(e, o, t, i, c, r) {
|
|
164
|
+
return d(), u("div", null, [
|
|
165
|
+
t.type == 0 ? (d(), u("div", {
|
|
156
166
|
key: 0,
|
|
157
|
-
class:
|
|
158
|
-
style:
|
|
159
|
-
onClick: o[0] || (o[0] = (...
|
|
167
|
+
class: R(["button", c.status && t.typeOnOff && "button-active"]),
|
|
168
|
+
style: h([r.customStyle, c.status && t.typeOnOff && r.customActive]),
|
|
169
|
+
onClick: o[0] || (o[0] = (...n) => r.btnClick && r.btnClick(...n))
|
|
160
170
|
}, [
|
|
161
|
-
t.icon && t.iconPosition.toLowerCase() === "left" ? (
|
|
171
|
+
t.icon && t.iconPosition.toLowerCase() === "left" ? (d(), u("img", {
|
|
162
172
|
key: 0,
|
|
163
173
|
class: "icon",
|
|
164
|
-
style:
|
|
174
|
+
style: h({ width: t.iconSize }),
|
|
165
175
|
src: t.icon
|
|
166
|
-
}, null, 12,
|
|
167
|
-
t.textValue ? (
|
|
168
|
-
t.icon && t.iconPosition.toLowerCase() === "right" ? (
|
|
176
|
+
}, null, 12, ut)) : w("", !0),
|
|
177
|
+
t.textValue ? (d(), u("div", ct, b(t.textValue), 1)) : w("", !0),
|
|
178
|
+
t.icon && t.iconPosition.toLowerCase() === "right" ? (d(), u("img", {
|
|
169
179
|
key: 2,
|
|
170
180
|
class: "icon",
|
|
171
|
-
style:
|
|
181
|
+
style: h({ width: t.iconSize }),
|
|
172
182
|
src: t.icon
|
|
173
|
-
}, null, 12,
|
|
183
|
+
}, null, 12, pt)) : w("", !0)
|
|
174
184
|
], 6)) : w("", !0),
|
|
175
|
-
t.type == 1 ? (
|
|
185
|
+
t.type == 1 ? (d(), u("div", {
|
|
176
186
|
key: 1,
|
|
177
187
|
class: "button-target",
|
|
178
|
-
onClick: o[1] || (o[1] = (...
|
|
188
|
+
onClick: o[1] || (o[1] = (...n) => r.btnClick && r.btnClick(...n))
|
|
179
189
|
}, [
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
190
|
+
l("div", ft, [
|
|
191
|
+
mt,
|
|
192
|
+
l("div", gt, b(t.textStat), 1)
|
|
183
193
|
]),
|
|
184
|
-
|
|
194
|
+
l("div", yt, b(t.textCategory), 1)
|
|
185
195
|
])) : w("", !0)
|
|
186
196
|
]);
|
|
187
197
|
}
|
|
188
|
-
const vt = /* @__PURE__ */
|
|
189
|
-
key: 1,
|
|
190
|
-
width: "8",
|
|
191
|
-
height: "4",
|
|
192
|
-
viewBox: "0 0 8 4",
|
|
193
|
-
fill: "none",
|
|
194
|
-
xmlns: "http://www.w3.org/2000/svg"
|
|
195
|
-
}, wt = ["fill"], kt = { class: "gsc-dropdown__items-container" }, _t = ["onClick"], xt = {
|
|
198
|
+
const vt = /* @__PURE__ */ st(V, [["render", ht], ["__scopeId", "data-v-f3ee6b2b"]]), bt = { class: "gsc-dropdown__main-container__item-selected" }, St = ["height", "width"], Ct = ["stroke"], wt = { class: "gsc-dropdown__items-container" }, kt = ["onClick"], _t = {
|
|
196
199
|
key: 0,
|
|
197
200
|
class: "gsc-dropdown__items-footer"
|
|
198
|
-
},
|
|
201
|
+
}, xt = {
|
|
199
202
|
__name: "GSC-Dropdown",
|
|
200
203
|
props: {
|
|
201
204
|
modelValue: {
|
|
@@ -353,44 +356,37 @@ const vt = /* @__PURE__ */ nt(O, [["render", yt], ["__scopeId", "data-v-f3ee6b2b
|
|
|
353
356
|
onlyFirstTime: {
|
|
354
357
|
type: Boolean,
|
|
355
358
|
default: !1
|
|
356
|
-
},
|
|
357
|
-
iconType: {
|
|
358
|
-
type: Number,
|
|
359
|
-
default: 1,
|
|
360
|
-
validator: function(e) {
|
|
361
|
-
return [1, 2].includes(e);
|
|
362
|
-
}
|
|
363
359
|
}
|
|
364
360
|
},
|
|
365
361
|
emits: ["input", "click-ready", "update:modelValue"],
|
|
366
362
|
setup(e, { emit: o }) {
|
|
367
|
-
const t = e, i =
|
|
363
|
+
const t = e, i = y({}), c = y(null), r = y(t.isMultipleOption ? -1 : 0), n = y(!1);
|
|
368
364
|
z(
|
|
369
365
|
() => t.items,
|
|
370
|
-
(
|
|
371
|
-
if (!t.modelValue && (!t.onlyFirstTime || !
|
|
366
|
+
(s, g) => {
|
|
367
|
+
if (!t.modelValue && (!t.onlyFirstTime || !g || !g.length) && s && s.length) {
|
|
372
368
|
if (t.defaultItemByProp) {
|
|
373
369
|
const f = t.items.findIndex(
|
|
374
|
-
(
|
|
370
|
+
(v) => v[t.defaultItemByProp.propName] === t.defaultItemByProp.value
|
|
375
371
|
);
|
|
376
|
-
f !== -1 ? (
|
|
372
|
+
f !== -1 ? (r.value = f, i.value = s[f]) : (r.value = 0, i.value = s[0]);
|
|
377
373
|
} else
|
|
378
|
-
i.value =
|
|
374
|
+
i.value = s[t.defaultItemByIndex];
|
|
379
375
|
o("input", i.value);
|
|
380
376
|
}
|
|
381
377
|
},
|
|
382
378
|
{ immediate: !0 }
|
|
383
379
|
), z(
|
|
384
380
|
() => t.modelValue,
|
|
385
|
-
(
|
|
386
|
-
if (
|
|
387
|
-
const
|
|
388
|
-
|
|
381
|
+
(s) => {
|
|
382
|
+
if (s) {
|
|
383
|
+
const g = t.items.findIndex((f) => typeof s == "object" ? JSON.stringify(f) === JSON.stringify(s) : f === s);
|
|
384
|
+
g !== -1 && (r.value = g, i.value = t.items[g], o("update:modelValue", i.value));
|
|
389
385
|
}
|
|
390
386
|
},
|
|
391
387
|
{ immediate: !0 }
|
|
392
388
|
);
|
|
393
|
-
const
|
|
389
|
+
const m = x(() => ({
|
|
394
390
|
height: t.height,
|
|
395
391
|
width: t.width,
|
|
396
392
|
backgroundColor: t.backgroundColor,
|
|
@@ -423,83 +419,75 @@ const vt = /* @__PURE__ */ nt(O, [["render", yt], ["__scopeId", "data-v-f3ee6b2b
|
|
|
423
419
|
width: `${t.arrowWidth}px`
|
|
424
420
|
}));
|
|
425
421
|
function C() {
|
|
426
|
-
t.isDisabled || (
|
|
422
|
+
t.isDisabled || (n.value = !n.value);
|
|
427
423
|
}
|
|
428
|
-
function _(
|
|
429
|
-
c.value && !c.value.contains(
|
|
424
|
+
function _(s) {
|
|
425
|
+
c.value && !c.value.contains(s.target) && (n.value = !1);
|
|
430
426
|
}
|
|
431
|
-
function B(
|
|
432
|
-
t.isMultipleOption ?
|
|
427
|
+
function B(s, g) {
|
|
428
|
+
t.isMultipleOption ? r.value = -1 : (r.value = g, n.value = !1), i.value = s, o("input", i.value), o("update:modelValue", i.value);
|
|
433
429
|
}
|
|
434
430
|
function I() {
|
|
435
|
-
|
|
431
|
+
n.value = !1, o("click-ready");
|
|
436
432
|
}
|
|
437
|
-
return
|
|
433
|
+
return E(() => {
|
|
438
434
|
document.addEventListener("click", _);
|
|
439
435
|
}), q(() => {
|
|
440
436
|
document.removeEventListener("click", _);
|
|
441
|
-
}), (
|
|
437
|
+
}), (s, g) => (d(), u("div", {
|
|
442
438
|
ref_key: "dropDown",
|
|
443
439
|
ref: c,
|
|
444
440
|
class: "gsc-dropdown",
|
|
445
|
-
style:
|
|
441
|
+
style: h(m.value)
|
|
446
442
|
}, [
|
|
447
|
-
|
|
443
|
+
l("div", {
|
|
448
444
|
class: "gsc-dropdown__main-container",
|
|
449
|
-
style:
|
|
445
|
+
style: h({ "padding-right": `${e.arrowWidth + 8}px` }),
|
|
450
446
|
onClick: C
|
|
451
447
|
}, [
|
|
452
|
-
|
|
453
|
-
|
|
448
|
+
l("div", bt, [
|
|
449
|
+
P(s.$slots, "default", { selectedItem: i.value })
|
|
454
450
|
]),
|
|
455
|
-
|
|
456
|
-
class:
|
|
457
|
-
style:
|
|
451
|
+
l("div", {
|
|
452
|
+
class: R(["gsc-dropdown__main-container__icon", { "rotated-180": n.value }]),
|
|
453
|
+
style: h(S.value)
|
|
458
454
|
}, [
|
|
459
|
-
|
|
460
|
-
key: 0,
|
|
455
|
+
(d(), u("svg", {
|
|
461
456
|
height: e.arrowHeight,
|
|
462
457
|
width: e.arrowWidth,
|
|
463
458
|
viewBox: "0 0 24 24",
|
|
464
459
|
fill: "none",
|
|
465
460
|
xmlns: "http://www.w3.org/2000/svg"
|
|
466
461
|
}, [
|
|
467
|
-
|
|
462
|
+
l("path", {
|
|
468
463
|
d: "M18.394 9.13501L13.1302 14.3988C12.5086 15.0204 11.4914 15.0204 10.8697 14.3988L5.60596 9.13501",
|
|
469
464
|
stroke: e.arrowColor
|
|
470
|
-
}, null, 8,
|
|
471
|
-
], 8,
|
|
472
|
-
r("path", {
|
|
473
|
-
"fill-rule": "evenodd",
|
|
474
|
-
"clip-rule": "evenodd",
|
|
475
|
-
d: "M4 2.62045L6.86193 0.167368C7.12228 -0.0557892 7.54439 -0.0557892 7.80474 0.167368C8.06509 0.390524 8.06509 0.752333 7.80474 0.97549L4.4714 3.83263C4.21105 4.05579 3.78895 4.05579 3.5286 3.83263L0.195262 0.97549C-0.0650874 0.752333 -0.0650874 0.390524 0.195262 0.167368C0.455612 -0.0557892 0.877722 -0.0557892 1.13807 0.167368L4 2.62045Z",
|
|
476
|
-
fill: e.arrowColor
|
|
477
|
-
}, null, 8, wt)
|
|
478
|
-
]))
|
|
465
|
+
}, null, 8, Ct)
|
|
466
|
+
], 8, St))
|
|
479
467
|
], 6)
|
|
480
468
|
], 4),
|
|
481
|
-
|
|
469
|
+
F(K, null, {
|
|
482
470
|
default: W(() => [
|
|
483
|
-
L(
|
|
484
|
-
|
|
485
|
-
|
|
471
|
+
L(l("div", wt, [
|
|
472
|
+
l("div", null, [
|
|
473
|
+
l("div", {
|
|
486
474
|
class: "gsc-dropdown__items",
|
|
487
|
-
style:
|
|
475
|
+
style: h({ "margin-top": `${t.borderWidth}px` })
|
|
488
476
|
}, [
|
|
489
|
-
(
|
|
490
|
-
L((
|
|
491
|
-
class:
|
|
492
|
-
key:
|
|
493
|
-
onClick: (
|
|
477
|
+
(d(!0), u(J, null, M(e.items, (f, v) => (d(), u("div", null, [
|
|
478
|
+
L((d(), u("div", {
|
|
479
|
+
class: R(["gsc-dropdown__items__item", { selected: v === r.value }]),
|
|
480
|
+
key: v,
|
|
481
|
+
onClick: ($) => B(f, v)
|
|
494
482
|
}, [
|
|
495
|
-
|
|
496
|
-
], 10,
|
|
497
|
-
[
|
|
483
|
+
P(s.$slots, "availableItem", { item: f })
|
|
484
|
+
], 10, kt)), [
|
|
485
|
+
[D, !f.isHidden]
|
|
498
486
|
])
|
|
499
487
|
]))), 256))
|
|
500
488
|
], 4),
|
|
501
|
-
e.isFooterVisible ? (
|
|
502
|
-
|
|
489
|
+
e.isFooterVisible ? (d(), u("div", _t, [
|
|
490
|
+
F(O(vt), {
|
|
503
491
|
"text-value": "Listo",
|
|
504
492
|
"border-color": "#cbee6b",
|
|
505
493
|
"font-size": "12px",
|
|
@@ -512,25 +500,25 @@ const vt = /* @__PURE__ */ nt(O, [["render", yt], ["__scopeId", "data-v-f3ee6b2b
|
|
|
512
500
|
])) : w("", !0)
|
|
513
501
|
])
|
|
514
502
|
], 512), [
|
|
515
|
-
[
|
|
503
|
+
[D, n.value]
|
|
516
504
|
])
|
|
517
505
|
]),
|
|
518
506
|
_: 3
|
|
519
507
|
})
|
|
520
508
|
], 4));
|
|
521
509
|
}
|
|
522
|
-
},
|
|
510
|
+
}, Z = (e) => (U("data-v-11f36d4d"), e = e(), G(), e), Bt = { class: "header" }, It = /* @__PURE__ */ Z(() => /* @__PURE__ */ l("h2", null, "Próximos rivales", -1)), $t = { class: "" }, Tt = {
|
|
523
511
|
key: 0,
|
|
524
512
|
class: "rivals-grid"
|
|
525
|
-
},
|
|
513
|
+
}, Nt = {
|
|
526
514
|
key: 1,
|
|
527
515
|
class: "no-rivals-text-container"
|
|
528
|
-
},
|
|
516
|
+
}, zt = { class: "no-rivals" }, Ft = {
|
|
529
517
|
key: 2,
|
|
530
518
|
class: "no-rivals-text-container"
|
|
531
|
-
},
|
|
532
|
-
|
|
533
|
-
],
|
|
519
|
+
}, Rt = /* @__PURE__ */ Z(() => /* @__PURE__ */ l("h2", { class: "no-rivals" }, "Cargando...", -1)), Wt = [
|
|
520
|
+
Rt
|
|
521
|
+
], Ot = {
|
|
534
522
|
__name: "NextRivals",
|
|
535
523
|
props: {
|
|
536
524
|
teamId: {
|
|
@@ -615,7 +603,7 @@ const vt = /* @__PURE__ */ nt(O, [["render", yt], ["__scopeId", "data-v-f3ee6b2b
|
|
|
615
603
|
},
|
|
616
604
|
emits: ["click-rival"],
|
|
617
605
|
setup(e, { emit: o }) {
|
|
618
|
-
const t = e, i =
|
|
606
|
+
const t = e, i = y(null), c = y("rivals-grid"), r = y([]), n = y([]), m = y({}), S = y(!0), C = x(() => !t.provider || t.provider <= 1 ? null : `https://${t.isDevApis ? "dev-apis.golstats.com" : "apis.golstats.com"}/${t.provider}`);
|
|
619
607
|
z(
|
|
620
608
|
() => t.teamId,
|
|
621
609
|
(a) => {
|
|
@@ -625,7 +613,7 @@ const vt = /* @__PURE__ */ nt(O, [["render", yt], ["__scopeId", "data-v-f3ee6b2b
|
|
|
625
613
|
immediate: !0
|
|
626
614
|
}
|
|
627
615
|
);
|
|
628
|
-
const _ = x(() => t.areFemaleTeamsVisible ?
|
|
616
|
+
const _ = x(() => t.areFemaleTeamsVisible ? n.value : n.value.filter((a) => !a.is_female));
|
|
629
617
|
async function B() {
|
|
630
618
|
try {
|
|
631
619
|
const a = C.value ? `${C.value}/related-teams/${t.teamId}` : `https://kefloixzy1.execute-api.us-west-2.amazonaws.com/prod/related-teams/${t.teamId}`, p = await (await fetch(
|
|
@@ -637,11 +625,11 @@ const vt = /* @__PURE__ */ nt(O, [["render", yt], ["__scopeId", "data-v-f3ee6b2b
|
|
|
637
625
|
}
|
|
638
626
|
}
|
|
639
627
|
)).json();
|
|
640
|
-
|
|
641
|
-
const
|
|
642
|
-
|
|
628
|
+
n.value = p;
|
|
629
|
+
const T = p.map((N) => I(N.team_id)), X = await Promise.all(T);
|
|
630
|
+
n.value.forEach((N, Y) => {
|
|
643
631
|
N.rivals = X[Y];
|
|
644
|
-
}),
|
|
632
|
+
}), m.value = n.value[0] || {}, S.value = !1;
|
|
645
633
|
} catch (a) {
|
|
646
634
|
console.error(a), S.value = !1;
|
|
647
635
|
}
|
|
@@ -662,59 +650,59 @@ const vt = /* @__PURE__ */ nt(O, [["render", yt], ["__scopeId", "data-v-f3ee6b2b
|
|
|
662
650
|
console.error(k);
|
|
663
651
|
}
|
|
664
652
|
}
|
|
665
|
-
function
|
|
653
|
+
function s() {
|
|
666
654
|
i.value && (c.value = "rivals-grid");
|
|
667
655
|
}
|
|
668
|
-
function
|
|
656
|
+
function g(a) {
|
|
669
657
|
o("click-rival", a);
|
|
670
658
|
}
|
|
671
659
|
function f(a) {
|
|
672
|
-
|
|
660
|
+
m.value = a, r.value = a.rivals || [];
|
|
673
661
|
}
|
|
674
|
-
function
|
|
675
|
-
|
|
662
|
+
function v(a) {
|
|
663
|
+
m.value = a, r.value = a.rivals || [];
|
|
676
664
|
}
|
|
677
|
-
const
|
|
678
|
-
return
|
|
679
|
-
i.value &&
|
|
665
|
+
const $ = new ResizeObserver(s);
|
|
666
|
+
return E(() => {
|
|
667
|
+
i.value && $.observe(i.value);
|
|
680
668
|
}), tt(() => {
|
|
681
|
-
|
|
682
|
-
}), (a, k) => (
|
|
669
|
+
$.disconnect();
|
|
670
|
+
}), (a, k) => (d(), u("div", {
|
|
683
671
|
class: "next-rivals",
|
|
684
672
|
ref_key: "containerRef",
|
|
685
673
|
ref: i
|
|
686
674
|
}, [
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
"model-value":
|
|
675
|
+
l("div", Bt, [
|
|
676
|
+
It,
|
|
677
|
+
F(O(xt), et(t, {
|
|
678
|
+
"model-value": m.value,
|
|
691
679
|
items: _.value,
|
|
692
680
|
onInput: f,
|
|
693
|
-
"onUpdate:modelValue":
|
|
681
|
+
"onUpdate:modelValue": v
|
|
694
682
|
}), {
|
|
695
683
|
default: W(({ selectedItem: p }) => [
|
|
696
|
-
|
|
684
|
+
l("div", $t, b(p.team_name), 1)
|
|
697
685
|
]),
|
|
698
686
|
availableItem: W(({ item: p }) => [
|
|
699
|
-
|
|
687
|
+
l("div", null, b(p.team_name), 1)
|
|
700
688
|
]),
|
|
701
689
|
_: 1
|
|
702
690
|
}, 16, ["model-value", "items"])
|
|
703
691
|
]),
|
|
704
|
-
|
|
705
|
-
(
|
|
692
|
+
m.value.rivals && m.value.rivals.length ? (d(), u("div", Tt, [
|
|
693
|
+
(d(!0), u(J, null, M(r.value, (p) => (d(), ot(lt, {
|
|
706
694
|
key: p.team_id,
|
|
707
|
-
logo: `https://golstatsimages.blob.core.windows.net/teams-80/${p.team_id}.png`,
|
|
695
|
+
logo: O(nt)(`https://golstatsimages.blob.core.windows.net/teams-80/${p.team_id}.png`, e.provider),
|
|
708
696
|
name: p.team_name,
|
|
709
697
|
rival: p,
|
|
710
|
-
onClickRival: (
|
|
698
|
+
onClickRival: (T) => g(p)
|
|
711
699
|
}, null, 8, ["logo", "name", "rival", "onClickRival"]))), 128))
|
|
712
|
-
])) : S.value ? (
|
|
713
|
-
|
|
700
|
+
])) : S.value ? (d(), u("div", Ft, Wt)) : (d(), u("div", Nt, [
|
|
701
|
+
l("h2", zt, b(m.value.team_name) + " no tiene partidos programados por el momento", 1)
|
|
714
702
|
]))
|
|
715
703
|
], 512));
|
|
716
704
|
}
|
|
717
|
-
}, Pt = /* @__PURE__ */
|
|
705
|
+
}, Pt = /* @__PURE__ */ H(Ot, [["__scopeId", "data-v-11f36d4d"]]);
|
|
718
706
|
export {
|
|
719
707
|
Pt as GSCNextRivals
|
|
720
708
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(u,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],e):(u=typeof globalThis<"u"?globalThis:u||self,e(u.GSCNextRivals={},u.Vue))})(this,function(u,e){"use strict";const N=(o,l)=>{const t=o.__vccOpts||o;for(const[r,d]of l)t[r]=d;return t},v=["src","alt"],z={class:"team-card__name"},T=N({__name:"GscTeamCard",props:{logo:{type:String,default:""},name:{type:String,default:""},url:{type:String,default:""},rival:{type:Object,default:()=>({})}},emits:["click-rival"],setup(o,{emit:l}){const t=o;function r(){l("click-rival",t.rival)}return(d,n)=>(e.openBlock(),e.createElementBlock("div",{class:"team-card",onClick:r},[e.createElementVNode("div",{class:"team-card__bg-image",style:e.normalizeStyle({"background-image":`url(${o.logo})`})},null,4),e.createElementVNode("img",{class:"team-card__image",src:o.logo,alt:o.name},null,8,v),e.createElementVNode("p",z,e.toDisplayString(o.name),1)]))}},[["__scopeId","data-v-8f13b2f7"]]),$=(o,l)=>{const t=o.__vccOpts||o;for(const[r,d]of l)t[r]=d;return t},k={props:{type:{type:Number,default:0},value:{type:Boolean,default:!1},textValue:String,icon:String,iconPosition:{type:String,default:"left"},iconSize:String,fontColor:{type:String,default:"#FFFFFF"},textDecoration:String,fontSize:{type:String,default:"16px"},fontSizeStat:{type:String,default:"16px"},fontStyle:String,fontFamily:{type:String,default:"Poppins-Regular"},height:{type:String,default:"fit-content"},width:{type:String,default:"fit-content"},borderRadius:{type:String,default:"0px"},borderType:{type:String,default:"solid"},borderWidth:{type:Number,default:0},borderWidthBtn:{type:String,default:"2px"},borderColor:String,backgroundColor:{type:String,default:"none"},activeBackgroundColor:{type:String,default:"#000000"},activeBorderWidth:{type:Number,default:2},activeBorderType:{type:String,default:"solid"},activeBorderColor:{type:String,default:"#cbee6b"},activeColorText:{type:String,default:"#FFFFFF"},cursorType:{type:String,default:"default"},typeOnOff:{type:Boolean,default:!1},textCategory:String,textStat:String,marginLeftStat:{type:String,default:"15%"}},watch:{value:{deep:!0,immediate:!0,handler(o){this.status=o}}},data(){return{status:!1}},computed:{customStyle(){return{height:this.height,width:this.width,backgroundColor:this.backgroundColor,borderRadius:this.borderRadius,border:`${this.borderType} ${this.borderWidth}px ${this.borderColor}`,color:this.fontColor,textDecoration:this.textDecoration,cursor:this.cursorType,fontSize:this.fontSize,fontStyle:this.fontStyle,fontFamily:`${this.fontFamily} !important`}},customActive(){return{backgroundColor:this.activeBackgroundColor,color:this.activeColorText,border:`${this.activeBorderType} ${this.activeBorderWidth}px ${this.activeBorderColor}`}}},methods:{btnClick(o){this.$emit("click",o),this.typeOnOff&&(this.status=!this.status,this.$emit("status",this.status))}}},I=()=>{e.useCssVars(o=>({"9d01acb4":o.height,"14e95081":o.borderWidthBtn,"38fec285":o.borderType,34353510:o.borderColor,"20d20dc6":o.borderRadius,17130967:o.width,"4ccb7d36":o.backgroundColor,"5d1e86a2":o.cursorType,ce65d4a2:o.fontSize,fe4ac47a:o.fontStyle,f98e44dc:o.fontFamily,"93b87770":o.marginLeftStat,c7f7beba:o.fontSizeStat}))},V=k.setup;k.setup=V?(o,l)=>(I(),V(o,l)):I;const F=o=>(e.pushScopeId("data-v-f3ee6b2b"),o=o(),e.popScopeId(),o),R=["src"],W={key:1,class:"text"},O=["src"],D={class:"stats"},L=F(()=>e.createElementVNode("img",{class:"iconstats",src:"https://golstatsimages.blob.core.windows.net/todoelfut/playdes.png"},null,-1)),P={class:"numstats"},M={class:"leyend"};function j(o,l,t,r,d,n){return e.openBlock(),e.createElementBlock("div",null,[t.type==0?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["button",d.status&&t.typeOnOff&&"button-active"]),style:e.normalizeStyle([n.customStyle,d.status&&t.typeOnOff&&n.customActive]),onClick:l[0]||(l[0]=(...s)=>n.btnClick&&n.btnClick(...s))},[t.icon&&t.iconPosition.toLowerCase()==="left"?(e.openBlock(),e.createElementBlock("img",{key:0,class:"icon",style:e.normalizeStyle({width:t.iconSize}),src:t.icon},null,12,R)):e.createCommentVNode("",!0),t.textValue?(e.openBlock(),e.createElementBlock("div",W,e.toDisplayString(t.textValue),1)):e.createCommentVNode("",!0),t.icon&&t.iconPosition.toLowerCase()==="right"?(e.openBlock(),e.createElementBlock("img",{key:2,class:"icon",style:e.normalizeStyle({width:t.iconSize}),src:t.icon},null,12,O)):e.createCommentVNode("",!0)],6)):e.createCommentVNode("",!0),t.type==1?(e.openBlock(),e.createElementBlock("div",{key:1,class:"button-target",onClick:l[1]||(l[1]=(...s)=>n.btnClick&&n.btnClick(...s))},[e.createElementVNode("div",D,[L,e.createElementVNode("div",P,e.toDisplayString(t.textStat),1)]),e.createElementVNode("div",M,e.toDisplayString(t.textCategory),1)])):e.createCommentVNode("",!0)])}const A=$(k,[["render",j],["__scopeId","data-v-f3ee6b2b"]]),J={class:"gsc-dropdown__main-container__item-selected"},U=["height","width"],G=["stroke"],Z={key:1,width:"8",height:"4",viewBox:"0 0 8 4",fill:"none",xmlns:"http://www.w3.org/2000/svg"},H=["fill"],X={class:"gsc-dropdown__items-container"},Y=["onClick"],q={key:0,class:"gsc-dropdown__items-footer"},K={__name:"GSC-Dropdown",props:{modelValue:{type:[Object,Number,String],default:()=>null},height:{type:String,default:"fit-content"},width:{type:String,default:"fit-content"},fontSize:{type:String,default:"14px"},borderRadius:{type:Number,default:5},arrowHeight:{type:Number,default:24},arrowWidth:{type:Number,default:24},borderType:{type:String,default:"solid",validator:function(o){return["solid","dotted","dashed"].includes(o)}},borderWidth:{type:Number,default:1},borderColor:{type:String,default:"black"},backgroundColor:{type:String,default:"grey"},color:{type:String,default:"black"},arrowColor:{type:String,default:"#CBEE6B"},items:{type:Array,default:()=>[]},defaultItemByIndex:{type:Number,default:0},defaultItemByProp:{type:Object,default:null,validator:o=>["propName","value"].every(l=>l in o)},listBackgroundColor:{type:String,default:"white"},hoverBackgroundColor:{type:String,default:"#f1f1f1"},listMarginTop:{type:String,default:"0"},listContainerPadding:{type:String,default:"0"},listItemPadding:{type:String,default:"10px 12px"},listItemMargin:{type:String,default:"0"},listHeight:{type:String,default:"fit-content"},listItemSelectedColor:{type:String,default:"white"},listItemSelectedBackgroundColor:{type:String,default:"#399cfd"},listItemColor:{type:String,default:"black"},listBorderRadius:{type:String,default:"0"},listBorderColor:{type:String,default:""},listBorderWidth:{type:Number,default:1},listItemBorderRadius:{type:String,default:"0"},listAlignment:{type:String,default:"left"},isListSameWidth:{type:Boolean,default:!1},isMultipleOption:{type:Boolean,default:!1},footerBorderColor:{type:String,default:"#626970"},footerBorderWidth:{type:Number,default:1},isFooterVisible:{type:Boolean,default:!1},isDisabled:{type:Boolean,default:!1},onlyFirstTime:{type:Boolean,default:!1},iconType:{type:Number,default:1,validator:function(o){return[1,2].includes(o)}}},emits:["input","click-ready","update:modelValue"],setup(o,{emit:l}){const t=o,r=e.ref({}),d=e.ref(null),n=e.ref(t.isMultipleOption?-1:0),s=e.ref(!1);e.watch(()=>t.items,(a,m)=>{if(!t.modelValue&&(!t.onlyFirstTime||!m||!m.length)&&a&&a.length){if(t.defaultItemByProp){const p=t.items.findIndex(g=>g[t.defaultItemByProp.propName]===t.defaultItemByProp.value);p!==-1?(n.value=p,r.value=a[p]):(n.value=0,r.value=a[0])}else r.value=a[t.defaultItemByIndex];l("input",r.value)}},{immediate:!0}),e.watch(()=>t.modelValue,a=>{if(a){const m=t.items.findIndex(p=>typeof a=="object"?JSON.stringify(p)===JSON.stringify(a):p===a);m!==-1&&(n.value=m,r.value=t.items[m],l("update:modelValue",r.value))}},{immediate:!0});const f=e.computed(()=>({height:t.height,width:t.width,backgroundColor:t.backgroundColor,borderRadius:`${t.borderRadius}px`,border:`${t.borderType} ${t.borderWidth}px ${t.borderColor}`,color:t.color,"--hover-background-color":t.hoverBackgroundColor,"--list-container-padding":t.listContainerPadding,"--list-item-padding":t.listItemPadding,"--list-item-margin":t.listItemMargin,"--list-background-color":t.listBackgroundColor,"--list-height":t.listHeight,"--list-item-border-radius":t.listItemBorderRadius,"--list-item-selected-color":t.listItemSelectedColor,"--list-item-selected-background-color":t.listItemSelectedBackgroundColor,"--list-item-color":t.listItemColor,"--list-border-radius":`${t.listBorderRadius}`,"--list-border-color":t.listBorderColor,"--list-width":t.isListSameWidth?t.width:"fit-content","--list-border-width":`${t.listBorderWidth}px`,"--list-margin-top":t.listMarginTop,"--list-left":t.listAlignment==="left"?"0":"auto","--list-right":t.listAlignment==="right"?"0":"auto","--footer-border":`${t.footerBorderWidth}px solid ${t.footerBorderColor}`,"--dropdown-opacity":t.isDisabled?"0.5":"1","--dropdown-cursor":t.isDisabled?"not-allowed":"pointer","--dropdown-font-size":t.fontSize?t.fontSize:"14px"})),y=e.computed(()=>({height:`${t.arrowHeight}px`,width:`${t.arrowWidth}px`}));function h(){t.isDisabled||(s.value=!s.value)}function S(a){d.value&&!d.value.contains(a.target)&&(s.value=!1)}function C(a,m){t.isMultipleOption?n.value=-1:(n.value=m,s.value=!1),r.value=a,l("input",r.value),l("update:modelValue",r.value)}function B(){s.value=!1,l("click-ready")}return e.onMounted(()=>{document.addEventListener("click",S)}),e.onBeforeMount(()=>{document.removeEventListener("click",S)}),(a,m)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"dropDown",ref:d,class:"gsc-dropdown",style:e.normalizeStyle(f.value)},[e.createElementVNode("div",{class:"gsc-dropdown__main-container",style:e.normalizeStyle({"padding-right":`${o.arrowWidth+8}px`}),onClick:h},[e.createElementVNode("div",J,[e.renderSlot(a.$slots,"default",{selectedItem:r.value})]),e.createElementVNode("div",{class:e.normalizeClass(["gsc-dropdown__main-container__icon",{"rotated-180":s.value}]),style:e.normalizeStyle(y.value)},[o.iconType===1?(e.openBlock(),e.createElementBlock("svg",{key:0,height:o.arrowHeight,width:o.arrowWidth,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("path",{d:"M18.394 9.13501L13.1302 14.3988C12.5086 15.0204 11.4914 15.0204 10.8697 14.3988L5.60596 9.13501",stroke:o.arrowColor},null,8,G)],8,U)):(e.openBlock(),e.createElementBlock("svg",Z,[e.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M4 2.62045L6.86193 0.167368C7.12228 -0.0557892 7.54439 -0.0557892 7.80474 0.167368C8.06509 0.390524 8.06509 0.752333 7.80474 0.97549L4.4714 3.83263C4.21105 4.05579 3.78895 4.05579 3.5286 3.83263L0.195262 0.97549C-0.0650874 0.752333 -0.0650874 0.390524 0.195262 0.167368C0.455612 -0.0557892 0.877722 -0.0557892 1.13807 0.167368L4 2.62045Z",fill:o.arrowColor},null,8,H)]))],6)],4),e.createVNode(e.Transition,null,{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("div",X,[e.createElementVNode("div",null,[e.createElementVNode("div",{class:"gsc-dropdown__items",style:e.normalizeStyle({"margin-top":`${t.borderWidth}px`})},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.items,(p,g)=>(e.openBlock(),e.createElementBlock("div",null,[e.withDirectives((e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["gsc-dropdown__items__item",{selected:g===n.value}]),key:g,onClick:w=>C(p,g)},[e.renderSlot(a.$slots,"availableItem",{item:p})],10,Y)),[[e.vShow,!p.isHidden]])]))),256))],4),o.isFooterVisible?(e.openBlock(),e.createElementBlock("div",q,[e.createVNode(e.unref(A),{"text-value":"Listo","border-color":"#cbee6b","font-size":"12px",width:"72px",height:"22px","border-radius":"62px","border-width":.8,onClick:B})])):e.createCommentVNode("",!0)])],512),[[e.vShow,s.value]])]),_:3})],4))}},E=o=>(e.pushScopeId("data-v-7455bc9e"),o=o(),e.popScopeId(),o),Q={class:"header"},ee=E(()=>e.createElementVNode("h2",null,"Próximos rivales",-1)),te={class:""},oe={key:0,class:"rivals-grid"},le={key:1,class:"no-rivals-text-container"},re={class:"no-rivals"},ie={key:2,class:"no-rivals-text-container"},ae=[E(()=>e.createElementVNode("h2",{class:"no-rivals"},"Cargando...",-1))],ne=N({__name:"NextRivals",props:{teamId:{type:Number,default:392},token:{type:String,default:"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MCwibmFtZSI6IlVzdWFyaW8gRnJlZSIsInVzZXJuYW1lIjoiZnJlZUBnb2xzdGF0cy5jb20iLCJlbWFpbCI6ImZyZWVAZ29sc3RhdHMuY29tIiwiaWF0IjoxNjA2NzU4Nzk1LCJleHAiOjE2MzgyOTQ3OTV9.kPNmP7yDtk38cAXrUyc7OHRh6J25VFqy-XUNzbK-4YE"},fontFamily:{type:String,default:"Poppins-Light"},logosUrl:{type:String,default:"https://golstatsimages.blob.core.windows.net/todoelfut/"},logoFileType:{type:String,default:"png"},height:{type:String,default:"40px"},width:{type:String,default:"179px"},borderRadius:{type:Number,default:8},arrowHeight:{type:Number,default:24},arrowWidth:{type:Number,default:24},borderType:{type:String,default:"solid",validator:function(o){return["solid","dotted","dashed"].includes(o)}},borderWidth:{type:Number,default:1},borderColor:{type:String,default:"rgba(255, 255, 255, 0.2)"},backgroundColor:{type:String,default:"#0d1d29"},color:{type:String,default:"white"},arrowColor:{type:String,default:"#CBEE6B"},areFemaleTeamsVisible:{type:Boolean,default:!0},provider:{type:Number,default:1},isDevApis:{type:Boolean,default:!1}},emits:["click-rival"],setup(o,{emit:l}){const t=o,r=e.ref(null),d=e.ref("rivals-grid"),n=e.ref([]),s=e.ref([]),f=e.ref({}),y=e.ref(!0),h=e.computed(()=>!t.provider||t.provider<=1?null:`https://${t.isDevApis?"dev-apis.golstats.com":"apis.golstats.com"}/${t.provider}`);e.watch(()=>t.teamId,i=>{i&&(y.value=!0,C())},{immediate:!0});const S=e.computed(()=>t.areFemaleTeamsVisible?s.value:s.value.filter(i=>!i.is_female));async function C(){try{const i=h.value?`${h.value}/related-teams/${t.teamId}`:`https://kefloixzy1.execute-api.us-west-2.amazonaws.com/prod/related-teams/${t.teamId}`,c=await(await fetch(i,{method:"GET",headers:{Authorization:t.token}})).json();s.value=c;const _=c.map(x=>B(x.team_id)),se=await Promise.all(_);s.value.forEach((x,de)=>{x.rivals=se[de]}),f.value=s.value[0]||{},y.value=!1}catch(i){console.error(i),y.value=!1}}async function B(i){try{const b=h.value?`${h.value}/next-rivals/teams/${i}`:`https://ts7thxzaik.execute-api.us-west-2.amazonaws.com/prod/next-rivals/teams/${i}`;return(await(await fetch(b,{method:"GET",headers:{Authorization:t.token}})).json()).rivals||[]}catch(b){console.error(b)}}function a(){r.value&&(d.value="rivals-grid")}function m(i){l("click-rival",i)}function p(i){f.value=i,n.value=i.rivals||[]}function g(i){f.value=i,n.value=i.rivals||[]}const w=new ResizeObserver(a);return e.onMounted(()=>{r.value&&w.observe(r.value)}),e.onUnmounted(()=>{w.disconnect()}),(i,b)=>(e.openBlock(),e.createElementBlock("div",{class:"next-rivals",ref_key:"containerRef",ref:r},[e.createElementVNode("div",Q,[ee,e.createVNode(e.unref(K),e.mergeProps(t,{"model-value":f.value,items:S.value,onInput:p,"onUpdate:modelValue":g}),{default:e.withCtx(({selectedItem:c})=>[e.createElementVNode("div",te,e.toDisplayString(c.team_name),1)]),availableItem:e.withCtx(({item:c})=>[e.createElementVNode("div",null,e.toDisplayString(c.team_name),1)]),_:1},16,["model-value","items"])]),f.value.rivals&&f.value.rivals.length?(e.openBlock(),e.createElementBlock("div",oe,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.value,c=>(e.openBlock(),e.createBlock(T,{key:c.team_id,logo:`https://golstatsimages.blob.core.windows.net/teams-80/${c.team_id}.png`,name:c.team_name,rival:c,onClickRival:_=>m(c)},null,8,["logo","name","rival","onClickRival"]))),128))])):y.value?(e.openBlock(),e.createElementBlock("div",ie,ae)):(e.openBlock(),e.createElementBlock("div",le,[e.createElementVNode("h2",re,e.toDisplayString(f.value.team_name)+" no tiene partidos programados por el momento",1)]))],512))}},[["__scopeId","data-v-7455bc9e"]]);u.GSCNextRivals=ne,Object.defineProperty(u,Symbol.toStringTag,{value:"Module"})});
|
|
1
|
+
(function(u,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],e):(u=typeof globalThis<"u"?globalThis:u||self,e(u.GSCNextRivals={},u.Vue))})(this,function(u,e){"use strict";const N=(o,r)=>{const t=o.__vccOpts||o;for(const[l,d]of r)t[l]=d;return t},v=["src","alt"],z={class:"team-card__name"},$=N({__name:"GscTeamCard",props:{logo:{type:String,default:""},name:{type:String,default:""},url:{type:String,default:""},rival:{type:Object,default:()=>({})}},emits:["click-rival"],setup(o,{emit:r}){const t=o;function l(){r("click-rival",t.rival)}return(d,a)=>(e.openBlock(),e.createElementBlock("div",{class:"team-card",onClick:l},[e.createElementVNode("div",{class:"team-card__bg-image",style:e.normalizeStyle({"background-image":`url(${o.logo})`})},null,4),e.createElementVNode("img",{class:"team-card__image",src:o.logo,alt:o.name},null,8,v),e.createElementVNode("p",z,e.toDisplayString(o.name),1)]))}},[["__scopeId","data-v-8f13b2f7"]]);function T(o,r){if(!r||r<=1)return o;const t=new URL(o),l=t.pathname.split("/").filter(m=>m!=="");if(l.length===0)return o;const[d,...a]=l,n=[d,r,...a].join("/");return`${t.origin}/${n}${t.search}`}const F=(o,r)=>{const t=o.__vccOpts||o;for(const[l,d]of r)t[l]=d;return t},k={props:{type:{type:Number,default:0},value:{type:Boolean,default:!1},textValue:String,icon:String,iconPosition:{type:String,default:"left"},iconSize:String,fontColor:{type:String,default:"#FFFFFF"},textDecoration:String,fontSize:{type:String,default:"16px"},fontSizeStat:{type:String,default:"16px"},fontStyle:String,fontFamily:{type:String,default:"Poppins-Regular"},height:{type:String,default:"fit-content"},width:{type:String,default:"fit-content"},borderRadius:{type:String,default:"0px"},borderType:{type:String,default:"solid"},borderWidth:{type:Number,default:0},borderWidthBtn:{type:String,default:"2px"},borderColor:String,backgroundColor:{type:String,default:"none"},activeBackgroundColor:{type:String,default:"#000000"},activeBorderWidth:{type:Number,default:2},activeBorderType:{type:String,default:"solid"},activeBorderColor:{type:String,default:"#cbee6b"},activeColorText:{type:String,default:"#FFFFFF"},cursorType:{type:String,default:"default"},typeOnOff:{type:Boolean,default:!1},textCategory:String,textStat:String,marginLeftStat:{type:String,default:"15%"}},watch:{value:{deep:!0,immediate:!0,handler(o){this.status=o}}},data(){return{status:!1}},computed:{customStyle(){return{height:this.height,width:this.width,backgroundColor:this.backgroundColor,borderRadius:this.borderRadius,border:`${this.borderType} ${this.borderWidth}px ${this.borderColor}`,color:this.fontColor,textDecoration:this.textDecoration,cursor:this.cursorType,fontSize:this.fontSize,fontStyle:this.fontStyle,fontFamily:`${this.fontFamily} !important`}},customActive(){return{backgroundColor:this.activeBackgroundColor,color:this.activeColorText,border:`${this.activeBorderType} ${this.activeBorderWidth}px ${this.activeBorderColor}`}}},methods:{btnClick(o){this.$emit("click",o),this.typeOnOff&&(this.status=!this.status,this.$emit("status",this.status))}}},I=()=>{e.useCssVars(o=>({"9d01acb4":o.height,"14e95081":o.borderWidthBtn,"38fec285":o.borderType,34353510:o.borderColor,"20d20dc6":o.borderRadius,17130967:o.width,"4ccb7d36":o.backgroundColor,"5d1e86a2":o.cursorType,ce65d4a2:o.fontSize,fe4ac47a:o.fontStyle,f98e44dc:o.fontFamily,"93b87770":o.marginLeftStat,c7f7beba:o.fontSizeStat}))},V=k.setup;k.setup=V?(o,r)=>(I(),V(o,r)):I;const R=o=>(e.pushScopeId("data-v-f3ee6b2b"),o=o(),e.popScopeId(),o),W=["src"],O={key:1,class:"text"},D=["src"],P={class:"stats"},L=R(()=>e.createElementVNode("img",{class:"iconstats",src:"https://golstatsimages.blob.core.windows.net/todoelfut/playdes.png"},null,-1)),j={class:"numstats"},M={class:"leyend"};function A(o,r,t,l,d,a){return e.openBlock(),e.createElementBlock("div",null,[t.type==0?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["button",d.status&&t.typeOnOff&&"button-active"]),style:e.normalizeStyle([a.customStyle,d.status&&t.typeOnOff&&a.customActive]),onClick:r[0]||(r[0]=(...n)=>a.btnClick&&a.btnClick(...n))},[t.icon&&t.iconPosition.toLowerCase()==="left"?(e.openBlock(),e.createElementBlock("img",{key:0,class:"icon",style:e.normalizeStyle({width:t.iconSize}),src:t.icon},null,12,W)):e.createCommentVNode("",!0),t.textValue?(e.openBlock(),e.createElementBlock("div",O,e.toDisplayString(t.textValue),1)):e.createCommentVNode("",!0),t.icon&&t.iconPosition.toLowerCase()==="right"?(e.openBlock(),e.createElementBlock("img",{key:2,class:"icon",style:e.normalizeStyle({width:t.iconSize}),src:t.icon},null,12,D)):e.createCommentVNode("",!0)],6)):e.createCommentVNode("",!0),t.type==1?(e.openBlock(),e.createElementBlock("div",{key:1,class:"button-target",onClick:r[1]||(r[1]=(...n)=>a.btnClick&&a.btnClick(...n))},[e.createElementVNode("div",P,[L,e.createElementVNode("div",j,e.toDisplayString(t.textStat),1)]),e.createElementVNode("div",M,e.toDisplayString(t.textCategory),1)])):e.createCommentVNode("",!0)])}const J=F(k,[["render",A],["__scopeId","data-v-f3ee6b2b"]]),U={class:"gsc-dropdown__main-container__item-selected"},G=["height","width"],H=["stroke"],Z={class:"gsc-dropdown__items-container"},X=["onClick"],Y={key:0,class:"gsc-dropdown__items-footer"},q={__name:"GSC-Dropdown",props:{modelValue:{type:[Object,Number,String],default:()=>null},height:{type:String,default:"fit-content"},width:{type:String,default:"fit-content"},fontSize:{type:String,default:"14px"},borderRadius:{type:Number,default:5},arrowHeight:{type:Number,default:24},arrowWidth:{type:Number,default:24},borderType:{type:String,default:"solid",validator:function(o){return["solid","dotted","dashed"].includes(o)}},borderWidth:{type:Number,default:1},borderColor:{type:String,default:"black"},backgroundColor:{type:String,default:"grey"},color:{type:String,default:"black"},arrowColor:{type:String,default:"#CBEE6B"},items:{type:Array,default:()=>[]},defaultItemByIndex:{type:Number,default:0},defaultItemByProp:{type:Object,default:null,validator:o=>["propName","value"].every(r=>r in o)},listBackgroundColor:{type:String,default:"white"},hoverBackgroundColor:{type:String,default:"#f1f1f1"},listMarginTop:{type:String,default:"0"},listContainerPadding:{type:String,default:"0"},listItemPadding:{type:String,default:"10px 12px"},listItemMargin:{type:String,default:"0"},listHeight:{type:String,default:"fit-content"},listItemSelectedColor:{type:String,default:"white"},listItemSelectedBackgroundColor:{type:String,default:"#399cfd"},listItemColor:{type:String,default:"black"},listBorderRadius:{type:String,default:"0"},listBorderColor:{type:String,default:""},listBorderWidth:{type:Number,default:1},listItemBorderRadius:{type:String,default:"0"},listAlignment:{type:String,default:"left"},isListSameWidth:{type:Boolean,default:!1},isMultipleOption:{type:Boolean,default:!1},footerBorderColor:{type:String,default:"#626970"},footerBorderWidth:{type:Number,default:1},isFooterVisible:{type:Boolean,default:!1},isDisabled:{type:Boolean,default:!1},onlyFirstTime:{type:Boolean,default:!1}},emits:["input","click-ready","update:modelValue"],setup(o,{emit:r}){const t=o,l=e.ref({}),d=e.ref(null),a=e.ref(t.isMultipleOption?-1:0),n=e.ref(!1);e.watch(()=>t.items,(s,f)=>{if(!t.modelValue&&(!t.onlyFirstTime||!f||!f.length)&&s&&s.length){if(t.defaultItemByProp){const p=t.items.findIndex(g=>g[t.defaultItemByProp.propName]===t.defaultItemByProp.value);p!==-1?(a.value=p,l.value=s[p]):(a.value=0,l.value=s[0])}else l.value=s[t.defaultItemByIndex];r("input",l.value)}},{immediate:!0}),e.watch(()=>t.modelValue,s=>{if(s){const f=t.items.findIndex(p=>typeof s=="object"?JSON.stringify(p)===JSON.stringify(s):p===s);f!==-1&&(a.value=f,l.value=t.items[f],r("update:modelValue",l.value))}},{immediate:!0});const m=e.computed(()=>({height:t.height,width:t.width,backgroundColor:t.backgroundColor,borderRadius:`${t.borderRadius}px`,border:`${t.borderType} ${t.borderWidth}px ${t.borderColor}`,color:t.color,"--hover-background-color":t.hoverBackgroundColor,"--list-container-padding":t.listContainerPadding,"--list-item-padding":t.listItemPadding,"--list-item-margin":t.listItemMargin,"--list-background-color":t.listBackgroundColor,"--list-height":t.listHeight,"--list-item-border-radius":t.listItemBorderRadius,"--list-item-selected-color":t.listItemSelectedColor,"--list-item-selected-background-color":t.listItemSelectedBackgroundColor,"--list-item-color":t.listItemColor,"--list-border-radius":`${t.listBorderRadius}`,"--list-border-color":t.listBorderColor,"--list-width":t.isListSameWidth?t.width:"fit-content","--list-border-width":`${t.listBorderWidth}px`,"--list-margin-top":t.listMarginTop,"--list-left":t.listAlignment==="left"?"0":"auto","--list-right":t.listAlignment==="right"?"0":"auto","--footer-border":`${t.footerBorderWidth}px solid ${t.footerBorderColor}`,"--dropdown-opacity":t.isDisabled?"0.5":"1","--dropdown-cursor":t.isDisabled?"not-allowed":"pointer","--dropdown-font-size":t.fontSize?t.fontSize:"14px"})),y=e.computed(()=>({height:`${t.arrowHeight}px`,width:`${t.arrowWidth}px`}));function h(){t.isDisabled||(n.value=!n.value)}function S(s){d.value&&!d.value.contains(s.target)&&(n.value=!1)}function C(s,f){t.isMultipleOption?a.value=-1:(a.value=f,n.value=!1),l.value=s,r("input",l.value),r("update:modelValue",l.value)}function B(){n.value=!1,r("click-ready")}return e.onMounted(()=>{document.addEventListener("click",S)}),e.onBeforeMount(()=>{document.removeEventListener("click",S)}),(s,f)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"dropDown",ref:d,class:"gsc-dropdown",style:e.normalizeStyle(m.value)},[e.createElementVNode("div",{class:"gsc-dropdown__main-container",style:e.normalizeStyle({"padding-right":`${o.arrowWidth+8}px`}),onClick:h},[e.createElementVNode("div",U,[e.renderSlot(s.$slots,"default",{selectedItem:l.value})]),e.createElementVNode("div",{class:e.normalizeClass(["gsc-dropdown__main-container__icon",{"rotated-180":n.value}]),style:e.normalizeStyle(y.value)},[(e.openBlock(),e.createElementBlock("svg",{height:o.arrowHeight,width:o.arrowWidth,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("path",{d:"M18.394 9.13501L13.1302 14.3988C12.5086 15.0204 11.4914 15.0204 10.8697 14.3988L5.60596 9.13501",stroke:o.arrowColor},null,8,H)],8,G))],6)],4),e.createVNode(e.Transition,null,{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("div",Z,[e.createElementVNode("div",null,[e.createElementVNode("div",{class:"gsc-dropdown__items",style:e.normalizeStyle({"margin-top":`${t.borderWidth}px`})},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.items,(p,g)=>(e.openBlock(),e.createElementBlock("div",null,[e.withDirectives((e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["gsc-dropdown__items__item",{selected:g===a.value}]),key:g,onClick:w=>C(p,g)},[e.renderSlot(s.$slots,"availableItem",{item:p})],10,X)),[[e.vShow,!p.isHidden]])]))),256))],4),o.isFooterVisible?(e.openBlock(),e.createElementBlock("div",Y,[e.createVNode(e.unref(J),{"text-value":"Listo","border-color":"#cbee6b","font-size":"12px",width:"72px",height:"22px","border-radius":"62px","border-width":.8,onClick:B})])):e.createCommentVNode("",!0)])],512),[[e.vShow,n.value]])]),_:3})],4))}},E=o=>(e.pushScopeId("data-v-11f36d4d"),o=o(),e.popScopeId(),o),K={class:"header"},Q=E(()=>e.createElementVNode("h2",null,"Próximos rivales",-1)),ee={class:""},te={key:0,class:"rivals-grid"},oe={key:1,class:"no-rivals-text-container"},re={class:"no-rivals"},le={key:2,class:"no-rivals-text-container"},ae=[E(()=>e.createElementVNode("h2",{class:"no-rivals"},"Cargando...",-1))],ie=N({__name:"NextRivals",props:{teamId:{type:Number,default:392},token:{type:String,default:"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MCwibmFtZSI6IlVzdWFyaW8gRnJlZSIsInVzZXJuYW1lIjoiZnJlZUBnb2xzdGF0cy5jb20iLCJlbWFpbCI6ImZyZWVAZ29sc3RhdHMuY29tIiwiaWF0IjoxNjA2NzU4Nzk1LCJleHAiOjE2MzgyOTQ3OTV9.kPNmP7yDtk38cAXrUyc7OHRh6J25VFqy-XUNzbK-4YE"},fontFamily:{type:String,default:"Poppins-Light"},logosUrl:{type:String,default:"https://golstatsimages.blob.core.windows.net/todoelfut/"},logoFileType:{type:String,default:"png"},height:{type:String,default:"40px"},width:{type:String,default:"179px"},borderRadius:{type:Number,default:8},arrowHeight:{type:Number,default:24},arrowWidth:{type:Number,default:24},borderType:{type:String,default:"solid",validator:function(o){return["solid","dotted","dashed"].includes(o)}},borderWidth:{type:Number,default:1},borderColor:{type:String,default:"rgba(255, 255, 255, 0.2)"},backgroundColor:{type:String,default:"#0d1d29"},color:{type:String,default:"white"},arrowColor:{type:String,default:"#CBEE6B"},areFemaleTeamsVisible:{type:Boolean,default:!0},provider:{type:Number,default:1},isDevApis:{type:Boolean,default:!1}},emits:["click-rival"],setup(o,{emit:r}){const t=o,l=e.ref(null),d=e.ref("rivals-grid"),a=e.ref([]),n=e.ref([]),m=e.ref({}),y=e.ref(!0),h=e.computed(()=>!t.provider||t.provider<=1?null:`https://${t.isDevApis?"dev-apis.golstats.com":"apis.golstats.com"}/${t.provider}`);e.watch(()=>t.teamId,i=>{i&&(y.value=!0,C())},{immediate:!0});const S=e.computed(()=>t.areFemaleTeamsVisible?n.value:n.value.filter(i=>!i.is_female));async function C(){try{const i=h.value?`${h.value}/related-teams/${t.teamId}`:`https://kefloixzy1.execute-api.us-west-2.amazonaws.com/prod/related-teams/${t.teamId}`,c=await(await fetch(i,{method:"GET",headers:{Authorization:t.token}})).json();n.value=c;const _=c.map(x=>B(x.team_id)),ne=await Promise.all(_);n.value.forEach((x,se)=>{x.rivals=ne[se]}),m.value=n.value[0]||{},y.value=!1}catch(i){console.error(i),y.value=!1}}async function B(i){try{const b=h.value?`${h.value}/next-rivals/teams/${i}`:`https://ts7thxzaik.execute-api.us-west-2.amazonaws.com/prod/next-rivals/teams/${i}`;return(await(await fetch(b,{method:"GET",headers:{Authorization:t.token}})).json()).rivals||[]}catch(b){console.error(b)}}function s(){l.value&&(d.value="rivals-grid")}function f(i){r("click-rival",i)}function p(i){m.value=i,a.value=i.rivals||[]}function g(i){m.value=i,a.value=i.rivals||[]}const w=new ResizeObserver(s);return e.onMounted(()=>{l.value&&w.observe(l.value)}),e.onUnmounted(()=>{w.disconnect()}),(i,b)=>(e.openBlock(),e.createElementBlock("div",{class:"next-rivals",ref_key:"containerRef",ref:l},[e.createElementVNode("div",K,[Q,e.createVNode(e.unref(q),e.mergeProps(t,{"model-value":m.value,items:S.value,onInput:p,"onUpdate:modelValue":g}),{default:e.withCtx(({selectedItem:c})=>[e.createElementVNode("div",ee,e.toDisplayString(c.team_name),1)]),availableItem:e.withCtx(({item:c})=>[e.createElementVNode("div",null,e.toDisplayString(c.team_name),1)]),_:1},16,["model-value","items"])]),m.value.rivals&&m.value.rivals.length?(e.openBlock(),e.createElementBlock("div",te,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.value,c=>(e.openBlock(),e.createBlock($,{key:c.team_id,logo:e.unref(T)(`https://golstatsimages.blob.core.windows.net/teams-80/${c.team_id}.png`,o.provider),name:c.team_name,rival:c,onClickRival:_=>f(c)},null,8,["logo","name","rival","onClickRival"]))),128))])):y.value?(e.openBlock(),e.createElementBlock("div",le,ae)):(e.openBlock(),e.createElementBlock("div",oe,[e.createElementVNode("h2",re,e.toDisplayString(m.value.team_name)+" no tiene partidos programados por el momento",1)]))],512))}},[["__scopeId","data-v-11f36d4d"]]);u.GSCNextRivals=ie,Object.defineProperty(u,Symbol.toStringTag,{value:"Module"})});
|
package/dist/style.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.team-card[data-v-8f13b2f7]{width:100%;cursor:pointer;height:8.5rem;background:linear-gradient(180deg,#183143,#18314300);background:#193646;font-family:Poppins-Regular;font-style:normal;border-radius:.25rem;display:flex;align-items:center;flex-flow:column;justify-content:center;position:relative;overflow:hidden}.team-card__bg-image[data-v-8f13b2f7]{display:block;position:absolute;left:-50%;top:0;width:100%;height:100%;opacity:.04;background-repeat:no-repeat;background-position:0 50%;background-size:cover}.team-card__name[data-v-8f13b2f7]{color:#fff;text-align:center;font-size:.75rem;margin:0;font-family:inherit;font-weight:400;line-height:.9375rem}.team-card__image[data-v-8f13b2f7]{width:4.75rem;height:76;margin-bottom:1.125rem}.team-card[data-v-8f13b2f7]:hover{opacity:.6}.button[data-v-f3ee6b2b],.button-active[data-v-f3ee6b2b]{display:inline-flex;justify-content:center;align-content:center;align-items:center;overflow:none;cursor:pointer!important}.button-target[data-v-f3ee6b2b]{display:inline-block;overflow:hidden;height:var(--9d01acb4);border-width:var(--14e95081)!important;border-style:var(--38fec285)!important;border-color:var(--34353510)!important;border-radius:var(--20d20dc6)!important;width:var(--17130967);background-color:var(--4ccb7d36);justify-content:center;align-content:center;align-items:center;overflow:none;cursor:pointer!important;cursor:var(--5d1e86a2)!important;font-size:var(--ce65d4a2)!important;font-style:var(--fe4ac47a)!important;font-family:var(--f98e44dc)!important}.stats[data-v-f3ee6b2b]{display:inline-flex;width:100%;padding-top:5px;justify-content:left;align-items:center;align-content:center;height:60%}.iconstats[data-v-f3ee6b2b]{width:14px;height:14px;margin-left:var(--93b87770)}.numstats[data-v-f3ee6b2b]{font-family:Poppins-SemiBold;color:#fff;font-size:var(--c7f7beba);margin-left:7px}.leyend[data-v-f3ee6b2b]{display:inline-flex;justify-content:center;align-items:center;align-content:center;font-family:Poppins-Regular;color:#a0a3a5;width:100%;height:15%}.text[data-v-f3ee6b2b],.icon[data-v-f3ee6b2b]{padding:0 4px}.v-enter-active,.v-leave-active{transition:opacity .5s ease}.v-enter-from,.v-leave-to{opacity:0}.rotated-180{transform:rotate(180deg)}.gsc-dropdown{position:relative;display:inline-block;font-size:var(--dropdown-font-size);cursor:var(--dropdown-cursor);opacity:var(--dropdown-opacity)}.gsc-dropdown__main-container{height:100%;width:100%;display:flex;align-items:center}.gsc-dropdown__main-container__icon{position:absolute;right:6px;transition:transform .3s ease}.gsc-dropdown__main-container__item-selected{width:100%;padding:0 .5em}.gsc-dropdown__items-container{background-color:var(--list-background-color);border-radius:var(--list-border-radius);border:var(--list-border-width) solid var(--list-border-color);margin-top:var(--list-margin-top);display:block;position:absolute;left:var(--list-left);right:var(--list-right);width:var(--list-width);padding:var(--list-container-padding);box-shadow:0 8px 16px #0003;z-index:300}.gsc-dropdown__items-container>div{width:100%;height:fit-content;display:flex;flex-direction:column}.gsc-dropdown__items{max-height:var(--list-height);height:fit-content;width:var(--list-width);overflow:auto}.gsc-dropdown__items__item{white-space:nowrap;color:var(--list-item-color);padding:var(--list-item-padding);margin:var(--list-item-margin);border-radius:var(--list-item-border-radius)!important;text-decoration:none;display:block}.gsc-dropdown__items__item.selected{color:var(--list-item-selected-color);background-color:var(--list-item-selected-background-color)}.gsc-dropdown__items__item:not(.selected):hover{cursor:pointer;background-color:var(--hover-background-color)}.gsc-dropdown__items__item:first-child{border-top-left-radius:var(--list-border-radius);border-top-right-radius:var(--list-border-radius)}.gsc-dropdown__items-footer{height:50px;width:100%;display:flex;justify-content:center;align-items:center;border-top:var(--footer-border)}::-webkit-scrollbar{width:3px}::-webkit-scrollbar-track{border-radius:2.5px}::-webkit-scrollbar-thumb{background:#92929d;width:3px}::-webkit-scrollbar-thumb:hover{background:#92929d}@font-face{font-family:Poppins-Black;src:url(/fonts/Poppins-Black.otf) format("opentype")}@font-face{font-family:Poppins-BlackItalic;src:url(/fonts/Poppins-BlackItalic.otf) format("opentype")}@font-face{font-family:Poppins-Bold;src:url(/fonts/Poppins-Bold.otf) format("opentype")}@font-face{font-family:Poppins-BoldItalic;src:url(/fonts/Poppins-BoldItalic.otf) format("opentype")}@font-face{font-family:Poppins-ExtraBold;src:url(/fonts/Poppins-ExtraBold.otf) format("opentype")}@font-face{font-family:Poppins-ExtraBoldItalic;src:url(/fonts/Poppins-ExtraBoldItalic.otf) format("opentype")}@font-face{font-family:Poppins-ExtraLight;src:url(/fonts/Poppins-ExtraLight.otf) format("opentype")}@font-face{font-family:Poppins-ExtraLightItalic;src:url(/fonts/Poppins-ExtraLightItalic.otf) format("opentype")}@font-face{font-family:Poppins-Italic;src:url(/fonts/Poppins-Italic.otf) format("opentype")}@font-face{font-family:Poppins-Light;src:url(/fonts/Poppins-Light.otf) format("opentype")}@font-face{font-family:Poppins-LightItalic;src:url(/fonts/Poppins-LightItalic.otf) format("opentype")}@font-face{font-family:Poppins-MediumItalic;src:url(/fonts/Poppins-MediumItalic.otf) format("opentype")}@font-face{font-family:Poppins-Medium;src:url(/fonts/Poppins-Medium.otf) format("opentype")}@font-face{font-family:Poppins-Regular;src:url(/fonts/Poppins-Regular.otf) format("opentype")}@font-face{font-family:Poppins-SemiBold;src:url(/fonts/Poppins-SemiBold.otf) format("opentype")}@font-face{font-family:Poppins-SemiBoldItalic;src:url(/fonts/Poppins-SemiBoldItalic.otf) format("opentype")}@font-face{font-family:Poppins-ThinItalic;src:url(/fonts/Poppins-ThinItalic.otf) format("opentype")}@font-face{font-family:Poppins-Thin;src:url(/fonts/Poppins-Thin.otf) format("opentype")}@font-face{font-family:Montserrat-SemiBold;src:url(/fonts/Montserrat-SemiBold.otf) format("opentype")}@font-face{font-family:Oswald-Bold;src:url(/fonts/Oswald-Bold.ttf) format("truetype")}@font-face{font-family:Oswald-Regular;src:url(/fonts/Oswald-Regular.ttf) format("truetype")}@font-face{font-family:Oswald-SemiBold;src:url(/fonts/Oswald-SemiBold.ttf) format("truetype")}@font-face{font-family:Oswald-Medium;src:url(/fonts/Oswald-Medium.ttf) format("truetype")}@font-face{font-family:BebasNeueBold;src:url(/fonts/BebasNeue-Bold.woff2) format("woff2")}@font-face{font-family:BebasNeueBook;src:url(/fonts/BebasNeue-Book.woff2) format("woff2")}@font-face{font-family:BebasNeueLight;src:url(/fonts/BebasNeue-Light.woff2) format("woff2")}@font-face{font-family:BebasNeueRegular;src:url(/fonts/BebasNeue-Regular.woff2) format("woff2")}@font-face{font-family:BebasNeueThin;src:url(/fonts/BebasNeue-Thin.woff2) format("woff2")}.next-rivals[data-v-
|
|
1
|
+
.team-card[data-v-8f13b2f7]{width:100%;cursor:pointer;height:8.5rem;background:linear-gradient(180deg,#183143,#18314300);background:#193646;font-family:Poppins-Regular;font-style:normal;border-radius:.25rem;display:flex;align-items:center;flex-flow:column;justify-content:center;position:relative;overflow:hidden}.team-card__bg-image[data-v-8f13b2f7]{display:block;position:absolute;left:-50%;top:0;width:100%;height:100%;opacity:.04;background-repeat:no-repeat;background-position:0 50%;background-size:cover}.team-card__name[data-v-8f13b2f7]{color:#fff;text-align:center;font-size:.75rem;margin:0;font-family:inherit;font-weight:400;line-height:.9375rem}.team-card__image[data-v-8f13b2f7]{width:4.75rem;height:76;margin-bottom:1.125rem}.team-card[data-v-8f13b2f7]:hover{opacity:.6}.button[data-v-f3ee6b2b],.button-active[data-v-f3ee6b2b]{display:inline-flex;justify-content:center;align-content:center;align-items:center;overflow:none;cursor:pointer!important}.button-target[data-v-f3ee6b2b]{display:inline-block;overflow:hidden;height:var(--9d01acb4);border-width:var(--14e95081)!important;border-style:var(--38fec285)!important;border-color:var(--34353510)!important;border-radius:var(--20d20dc6)!important;width:var(--17130967);background-color:var(--4ccb7d36);justify-content:center;align-content:center;align-items:center;overflow:none;cursor:pointer!important;cursor:var(--5d1e86a2)!important;font-size:var(--ce65d4a2)!important;font-style:var(--fe4ac47a)!important;font-family:var(--f98e44dc)!important}.stats[data-v-f3ee6b2b]{display:inline-flex;width:100%;padding-top:5px;justify-content:left;align-items:center;align-content:center;height:60%}.iconstats[data-v-f3ee6b2b]{width:14px;height:14px;margin-left:var(--93b87770)}.numstats[data-v-f3ee6b2b]{font-family:Poppins-SemiBold;color:#fff;font-size:var(--c7f7beba);margin-left:7px}.leyend[data-v-f3ee6b2b]{display:inline-flex;justify-content:center;align-items:center;align-content:center;font-family:Poppins-Regular;color:#a0a3a5;width:100%;height:15%}.text[data-v-f3ee6b2b],.icon[data-v-f3ee6b2b]{padding:0 4px}.v-enter-active,.v-leave-active{transition:opacity .5s ease}.v-enter-from,.v-leave-to{opacity:0}.rotated-180{transform:rotate(180deg)}.gsc-dropdown{position:relative;display:inline-block;font-size:var(--dropdown-font-size);cursor:var(--dropdown-cursor);opacity:var(--dropdown-opacity)}.gsc-dropdown__main-container{height:100%;width:100%;display:flex;align-items:center}.gsc-dropdown__main-container__icon{position:absolute;right:6px;transition:transform .3s ease}.gsc-dropdown__main-container__item-selected{width:100%;padding:0 .5em}.gsc-dropdown__items-container{background-color:var(--list-background-color);border-radius:var(--list-border-radius);border:var(--list-border-width) solid var(--list-border-color);margin-top:var(--list-margin-top);display:block;position:absolute;left:var(--list-left);right:var(--list-right);width:var(--list-width);padding:var(--list-container-padding);box-shadow:0 8px 16px #0003;z-index:300}.gsc-dropdown__items-container>div{width:100%;height:fit-content;display:flex;flex-direction:column}.gsc-dropdown__items{max-height:var(--list-height);height:fit-content;width:var(--list-width);overflow:auto}.gsc-dropdown__items__item{white-space:nowrap;color:var(--list-item-color);padding:var(--list-item-padding);margin:var(--list-item-margin);border-radius:var(--list-item-border-radius)!important;text-decoration:none;display:block}.gsc-dropdown__items__item.selected{color:var(--list-item-selected-color);background-color:var(--list-item-selected-background-color)}.gsc-dropdown__items__item:not(.selected):hover{cursor:pointer;background-color:var(--hover-background-color)}.gsc-dropdown__items__item:first-child{border-top-left-radius:var(--list-border-radius);border-top-right-radius:var(--list-border-radius)}.gsc-dropdown__items-footer{height:50px;width:100%;display:flex;justify-content:center;align-items:center;border-top:var(--footer-border)}::-webkit-scrollbar{width:3px}::-webkit-scrollbar-track{border-radius:2.5px}::-webkit-scrollbar-thumb{background:#92929d;width:3px}::-webkit-scrollbar-thumb:hover{background:#92929d}@font-face{font-family:Poppins-Black;src:url(/fonts/Poppins-Black.otf) format("opentype")}@font-face{font-family:Poppins-BlackItalic;src:url(/fonts/Poppins-BlackItalic.otf) format("opentype")}@font-face{font-family:Poppins-Bold;src:url(/fonts/Poppins-Bold.otf) format("opentype")}@font-face{font-family:Poppins-BoldItalic;src:url(/fonts/Poppins-BoldItalic.otf) format("opentype")}@font-face{font-family:Poppins-ExtraBold;src:url(/fonts/Poppins-ExtraBold.otf) format("opentype")}@font-face{font-family:Poppins-ExtraBoldItalic;src:url(/fonts/Poppins-ExtraBoldItalic.otf) format("opentype")}@font-face{font-family:Poppins-ExtraLight;src:url(/fonts/Poppins-ExtraLight.otf) format("opentype")}@font-face{font-family:Poppins-ExtraLightItalic;src:url(/fonts/Poppins-ExtraLightItalic.otf) format("opentype")}@font-face{font-family:Poppins-Italic;src:url(/fonts/Poppins-Italic.otf) format("opentype")}@font-face{font-family:Poppins-Light;src:url(/fonts/Poppins-Light.otf) format("opentype")}@font-face{font-family:Poppins-LightItalic;src:url(/fonts/Poppins-LightItalic.otf) format("opentype")}@font-face{font-family:Poppins-MediumItalic;src:url(/fonts/Poppins-MediumItalic.otf) format("opentype")}@font-face{font-family:Poppins-Medium;src:url(/fonts/Poppins-Medium.otf) format("opentype")}@font-face{font-family:Poppins-Regular;src:url(/fonts/Poppins-Regular.otf) format("opentype")}@font-face{font-family:Poppins-SemiBold;src:url(/fonts/Poppins-SemiBold.otf) format("opentype")}@font-face{font-family:Poppins-SemiBoldItalic;src:url(/fonts/Poppins-SemiBoldItalic.otf) format("opentype")}@font-face{font-family:Poppins-ThinItalic;src:url(/fonts/Poppins-ThinItalic.otf) format("opentype")}@font-face{font-family:Poppins-Thin;src:url(/fonts/Poppins-Thin.otf) format("opentype")}@font-face{font-family:Montserrat-SemiBold;src:url(/fonts/Montserrat-SemiBold.otf) format("opentype")}@font-face{font-family:Oswald-Bold;src:url(/fonts/Oswald-Bold.ttf) format("truetype")}@font-face{font-family:Oswald-Regular;src:url(/fonts/Oswald-Regular.ttf) format("truetype")}@font-face{font-family:Oswald-SemiBold;src:url(/fonts/Oswald-SemiBold.ttf) format("truetype")}@font-face{font-family:Oswald-Medium;src:url(/fonts/Oswald-Medium.ttf) format("truetype")}@font-face{font-family:BebasNeueBold;src:url(/fonts/BebasNeue-Bold.woff2) format("woff2")}@font-face{font-family:BebasNeueBook;src:url(/fonts/BebasNeue-Book.woff2) format("woff2")}@font-face{font-family:BebasNeueLight;src:url(/fonts/BebasNeue-Light.woff2) format("woff2")}@font-face{font-family:BebasNeueRegular;src:url(/fonts/BebasNeue-Regular.woff2) format("woff2")}@font-face{font-family:BebasNeueThin;src:url(/fonts/BebasNeue-Thin.woff2) format("woff2")}.next-rivals[data-v-11f36d4d]{border-radius:8px;padding:20px;color:#fff}.header[data-v-11f36d4d]{display:flex;justify-content:space-between;align-items:center}h2[data-v-11f36d4d]{font-family:Poppins-Medium;font-size:22px;font-weight:500;font-stretch:normal;font-style:normal;line-height:normal;letter-spacing:normal;text-align:left;color:#fff}@media (max-width: 600px){h2[data-v-11f36d4d]{font-size:19px}}@media (max-width: 389px){h2[data-v-11f36d4d]{width:100%}}.rivals-grid[data-v-11f36d4d]{margin-top:20px;display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:20px;justify-content:center}.rival-card[data-v-11f36d4d]{background-color:#0003;border-radius:8px;padding:20px;display:flex;flex-direction:column;align-items:center;gap:12px;transition:transform .2s;width:100%;min-width:150px;max-width:200px;margin:0 auto}.rival-card[data-v-11f36d4d]:hover{transform:translateY(-2px)}.rival-logo[data-v-11f36d4d]{width:80px;height:80px;object-fit:contain}.rival-name[data-v-11f36d4d]{font-size:1.1rem;font-weight:500}.no-rivals-text-container[data-v-11f36d4d]{height:319px;align-self:stretch;display:flex;flex-direction:row;justify-content:center;align-items:center;gap:10px;padding:10px;border-radius:9px;border:dashed 1px rgba(255,255,255,.2)}.no-rivals[data-v-11f36d4d]{opacity:.7;font-family:Poppins-Light;font-size:11px;letter-spacing:.2px;text-align:center;color:#fff}
|