@anywayseo/tools 5.5.0 → 5.6.0

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.
Files changed (114) hide show
  1. package/dist/components/base/h1/index.d.ts +4 -0
  2. package/dist/components/base/h2/index.d.ts +4 -0
  3. package/dist/components/base/h3/index.d.ts +4 -0
  4. package/dist/components/base/index.d.ts +8 -0
  5. package/dist/components/base/link/index.d.ts +5 -1
  6. package/dist/components/base/link/utils.d.ts +1 -0
  7. package/dist/components/base/ol/index.d.ts +4 -0
  8. package/dist/components/base/p/index.d.ts +4 -0
  9. package/dist/components/base/ul/index.d.ts +4 -0
  10. package/dist/components/index.cjs +21 -9
  11. package/dist/components/index.d.ts +1 -3
  12. package/dist/components/index.mjs +27 -15
  13. package/dist/components/{contact-form → pages/contacts/contact-form}/index.d.ts +1 -1
  14. package/dist/components/pages/contacts/index.d.ts +3 -0
  15. package/dist/components/pages/cookie-policy/index.d.ts +3 -0
  16. package/dist/components/pages/index.d.ts +5 -0
  17. package/dist/components/pages/privacy-policy/index.d.ts +6 -0
  18. package/dist/components/pages/terms-and-conditions/index.d.ts +6 -0
  19. package/dist/hooks/index.cjs +1 -1
  20. package/dist/hooks/index.mjs +1 -1
  21. package/dist/i18n/index.cjs +10 -5
  22. package/dist/i18n/index.mjs +10 -5
  23. package/dist/i18n/resources/bg/index.d.ts +280 -0
  24. package/dist/i18n/resources/da/index.d.ts +280 -0
  25. package/dist/i18n/resources/de/index.d.ts +168 -0
  26. package/dist/i18n/resources/en/index.d.ts +168 -0
  27. package/dist/i18n/resources/fi/index.d.ts +280 -0
  28. package/dist/i18n/resources/fr/index.d.ts +168 -0
  29. package/dist/i18n/resources/it/index.d.ts +168 -0
  30. package/dist/i18n/resources/ka/index.d.ts +280 -0
  31. package/dist/i18n/resources/pt/index.d.ts +280 -0
  32. package/dist/i18n/resources/ru/index.d.ts +168 -0
  33. package/dist/{index-CAfBnNV6.js → index-5J1CqqcW.js} +1 -1
  34. package/dist/index-B1PwYYQt.mjs +24 -0
  35. package/dist/index-B6wz_B9_.js +145 -0
  36. package/dist/index-BEjKnOZA.mjs +28 -0
  37. package/dist/{index-BmaWfWLV.mjs → index-Bph7a3PR.mjs} +4 -0
  38. package/dist/index-C-ri0Fgy.js +23 -0
  39. package/dist/index-C2T70CMa.mjs +44 -0
  40. package/dist/index-COv56GyV.mjs +146 -0
  41. package/dist/{index-DZBLiQFh.js → index-CR5rM7at.js} +21 -6
  42. package/dist/index-CWMHJGbL.mjs +2957 -0
  43. package/dist/{index-BICcOaT7.js → index-CkRY_NXp.js} +0 -21
  44. package/dist/index-CyuHme_p.js +1059 -0
  45. package/dist/{index-BcFDxh8P.js → index-D4zJ5RBA.js} +13 -26
  46. package/dist/index-DDg_PkD2.js +27 -0
  47. package/dist/index-DMR4Ptkt.js +2956 -0
  48. package/dist/{index-tj12BA6U.mjs → index-DYS7zQW4.mjs} +1 -1
  49. package/dist/{index-At00w6EN.js → index-DgrIJs-a.js} +4 -0
  50. package/dist/{index-BCK4kr6V.mjs → index-Drz_7u2p.mjs} +3 -24
  51. package/dist/{index-8_-KtKsW.mjs → index-HLGPI9-S.mjs} +23 -8
  52. package/dist/{index-cEaX-HbN.mjs → index-JUwyHkmj.mjs} +222 -691
  53. package/dist/index.cjs +61 -45
  54. package/dist/index.d.ts +1 -0
  55. package/dist/index.mjs +52 -36
  56. package/dist/{components/layout → layout}/footer/navigation/index.d.ts +1 -1
  57. package/dist/layout/header/locale-switcher/icons/brazil/index.d.ts +2 -0
  58. package/dist/layout/header/locale-switcher/icons/bulgaria/index.d.ts +2 -0
  59. package/dist/layout/header/locale-switcher/icons/denmark/index.d.ts +2 -0
  60. package/dist/layout/header/locale-switcher/icons/finland/index.d.ts +2 -0
  61. package/dist/layout/header/locale-switcher/icons/france/index.d.ts +2 -0
  62. package/dist/layout/header/locale-switcher/icons/georgia/index.d.ts +2 -0
  63. package/dist/layout/header/locale-switcher/icons/germany/index.d.ts +2 -0
  64. package/dist/layout/header/locale-switcher/icons/globe/index.d.ts +2 -0
  65. package/dist/layout/header/locale-switcher/icons/index.d.ts +10 -0
  66. package/dist/layout/header/locale-switcher/icons/italy/index.d.ts +2 -0
  67. package/dist/layout/header/locale-switcher/icons/russia/index.d.ts +2 -0
  68. package/dist/{components/layout → layout}/header/locale-switcher/index.d.ts +1 -1
  69. package/dist/{components/layout → layout}/header/locale-switcher/utils.d.ts +1 -1
  70. package/dist/{components/layout → layout}/header/navigation/desktop/index.d.ts +1 -1
  71. package/dist/{components/layout → layout}/header/navigation/desktop/nav-list/index.d.ts +1 -1
  72. package/dist/{components/layout → layout}/header/navigation/index.d.ts +1 -1
  73. package/dist/{components/layout → layout}/header/navigation/mobile/index.d.ts +1 -1
  74. package/dist/{components/layout → layout}/header/navigation/mobile/nav-list/index.d.ts +1 -1
  75. package/dist/{components/layout → layout}/header/navigation/nav-link/index.d.ts +1 -1
  76. package/dist/{components/layout → layout}/hero/index.d.ts +1 -1
  77. package/dist/layout/index.cjs +596 -0
  78. package/dist/layout/index.mjs +597 -0
  79. package/dist/providers/index.cjs +2 -2
  80. package/dist/providers/index.mjs +2 -2
  81. package/dist/providers/mdx-provider/types.d.ts +3 -1
  82. package/dist/providers/mdx-provider/utils.d.ts +1 -2
  83. package/dist/types/components/strapi-component/index.d.ts +1 -1
  84. package/dist/types/i18n/index.d.ts +1 -1
  85. package/dist/utils/index.cjs +12 -10
  86. package/dist/utils/index.mjs +10 -8
  87. package/dist/utils/navigation/index.d.ts +1 -0
  88. package/package.json +7 -1
  89. package/dist/components/layout/header/locale-switcher/icons/earth/index.d.ts +0 -2
  90. package/dist/components/layout/header/locale-switcher/icons/france/index.d.ts +0 -2
  91. package/dist/components/layout/header/locale-switcher/icons/germany/index.d.ts +0 -2
  92. package/dist/components/layout/header/locale-switcher/icons/globe/index.d.ts +0 -2
  93. package/dist/components/layout/header/locale-switcher/icons/index.d.ts +0 -6
  94. package/dist/components/layout/header/locale-switcher/icons/italy/index.d.ts +0 -2
  95. package/dist/components/layout/header/locale-switcher/icons/russia/index.d.ts +0 -2
  96. package/dist/index-Bts2DBYS.mjs +0 -637
  97. package/dist/index-CJVr79Z2.js +0 -636
  98. package/dist/index-C_FekfFC.mjs +0 -57
  99. package/dist/index-D86anUPd.js +0 -1528
  100. /package/dist/components/{layout → base}/container/index.d.ts +0 -0
  101. /package/dist/components/{layout → base}/logo/index.d.ts +0 -0
  102. /package/dist/components/{not-found → pages/not-found}/index.d.ts +0 -0
  103. /package/dist/{components/layout → layout}/content/index.d.ts +0 -0
  104. /package/dist/{components/layout → layout}/footer/brand/index.d.ts +0 -0
  105. /package/dist/{components/layout → layout}/footer/copyright/index.d.ts +0 -0
  106. /package/dist/{components/layout → layout}/footer/disclaimer/index.d.ts +0 -0
  107. /package/dist/{components/layout → layout}/footer/extra/index.d.ts +0 -0
  108. /package/dist/{components/layout → layout}/footer/index.d.ts +0 -0
  109. /package/dist/{components/layout → layout}/header/brand/index.d.ts +0 -0
  110. /package/dist/{components/layout → layout}/header/index.d.ts +0 -0
  111. /package/dist/{components/layout → layout}/header/theme-toggler/index.d.ts +0 -0
  112. /package/dist/{components/layout → layout}/index.d.ts +0 -0
  113. /package/dist/{components/layout → layout}/main/index.d.ts +0 -0
  114. /package/dist/{components/layout → layout}/scroll-to-top/index.d.ts +0 -0
@@ -0,0 +1,1059 @@
1
+ "use strict";
2
+ const jsxRuntime = require("react/jsx-runtime");
3
+ const react$1 = require("@chakra-ui/react");
4
+ const reactI18next = require("react-i18next");
5
+ require("react-medium-image-zoom");
6
+ const index = require("./index-CR5rM7at.js");
7
+ const react$2 = require("@mdx-js/react");
8
+ const react = require("react");
9
+ require("./index-C6MG_f24.js");
10
+ const index$4 = require("./index-DMR4Ptkt.js");
11
+ const index$1 = require("./index-B6wz_B9_.js");
12
+ const index$6 = require("./index-DDg_PkD2.js");
13
+ const index$5 = require("./index-C-ri0Fgy.js");
14
+ const icons = require("@chakra-ui/icons");
15
+ const index$2 = require("./index-5J1CqqcW.js");
16
+ const index$3 = require("./index-CkRY_NXp.js");
17
+ const i18next = require("i18next");
18
+ const Markdown = require("react-markdown");
19
+ const ONE_LINE_HEIGHT = 24;
20
+ const Bio = ({ content, maxLines = 1 }) => {
21
+ const ref = react.useRef(null);
22
+ const [showToggle, setShowToggle] = react.useState(false);
23
+ const [isExpanded, setIsExpanded] = react.useState(false);
24
+ const { t } = reactI18next.useTranslation("author");
25
+ react.useLayoutEffect(() => {
26
+ if (ref.current) {
27
+ const { scrollWidth, clientWidth, scrollHeight, clientHeight } = ref.current;
28
+ const isClamped = scrollWidth > clientWidth || scrollHeight > clientHeight;
29
+ setShowToggle(isClamped);
30
+ }
31
+ return () => {
32
+ setShowToggle(false);
33
+ };
34
+ }, []);
35
+ function handleClick() {
36
+ setIsExpanded((prev) => !prev);
37
+ }
38
+ return /* @__PURE__ */ jsxRuntime.jsxs(react$1.Box, { children: [
39
+ /* @__PURE__ */ jsxRuntime.jsx(react$1.Collapse, { in: isExpanded, startingHeight: ONE_LINE_HEIGHT * maxLines, children: /* @__PURE__ */ jsxRuntime.jsx(react$1.Text, { ref, fontSize: "md", noOfLines: isExpanded ? void 0 : maxLines, children: content }) }),
40
+ showToggle && /* @__PURE__ */ jsxRuntime.jsx(react$1.Button, { size: "sm", variant: "link", colorScheme: "blue", onClick: handleClick, children: isExpanded ? t("action.collapse") : t("action.expand") })
41
+ ] });
42
+ };
43
+ const Author = ({ author, variant }) => {
44
+ const { name, role, bio, avatar, socialNetworks } = author;
45
+ if (variant === "short") {
46
+ return /* @__PURE__ */ jsxRuntime.jsxs(react$1.Flex, { align: "center", gap: 4, children: [
47
+ /* @__PURE__ */ jsxRuntime.jsx(react$1.Box, { w: 12, h: 12, children: /* @__PURE__ */ jsxRuntime.jsx(index.Image, { src: avatar, alt: name, rounded: "full" }) }),
48
+ /* @__PURE__ */ jsxRuntime.jsxs(react$1.Box, { fontWeight: "semibold", children: [
49
+ /* @__PURE__ */ jsxRuntime.jsx(react$1.Text, { children: name }),
50
+ /* @__PURE__ */ jsxRuntime.jsx(react$1.Text, { color: "gray.500", children: role })
51
+ ] })
52
+ ] });
53
+ }
54
+ return /* @__PURE__ */ jsxRuntime.jsxs(react$1.Flex, { direction: { base: "column", sm: "row" }, align: { base: "center", sm: "flex-start" }, gap: 4, children: [
55
+ /* @__PURE__ */ jsxRuntime.jsx(react$1.Flex, { flex: 1, maxW: { base: 48, sm: 32 }, children: /* @__PURE__ */ jsxRuntime.jsx(index.Image, { src: avatar, alt: name, rounded: "full" }) }),
56
+ /* @__PURE__ */ jsxRuntime.jsx(react$1.Flex, { flex: 1, children: /* @__PURE__ */ jsxRuntime.jsxs(react$1.Stack, { children: [
57
+ /* @__PURE__ */ jsxRuntime.jsxs(react$1.Text, { fontSize: "lg", fontWeight: 600, children: [
58
+ `${name}, `,
59
+ /* @__PURE__ */ jsxRuntime.jsx(react$1.Text, { as: "span", display: "inline-block", color: "gray.500", children: role })
60
+ ] }),
61
+ (socialNetworks == null ? void 0 : socialNetworks.length) && /* @__PURE__ */ jsxRuntime.jsx(index$1.SocialNetworks, { socialNetworks }),
62
+ /* @__PURE__ */ jsxRuntime.jsx(Bio, { content: bio })
63
+ ] }) })
64
+ ] });
65
+ };
66
+ const Center = ({ children, ...boxProps }) => {
67
+ return /* @__PURE__ */ jsxRuntime.jsx(react$1.Center, { ...boxProps, children });
68
+ };
69
+ const defaultColumns = { base: 1, sm: 2, md: 3, lg: 4, xl: 5 };
70
+ const Grid = ({ items, columns = defaultColumns, gap, render, getKey, ...boxProps }) => {
71
+ return /* @__PURE__ */ jsxRuntime.jsx(react$1.SimpleGrid, { as: "ul", columns, spacing: gap, p: 0, m: 0, listStyleType: "none", ...boxProps, children: items.map((item, index2) => /* @__PURE__ */ jsxRuntime.jsx(react$1.Box, { as: "li", children: render(item) }, getKey ? getKey(item) : index2)) });
72
+ };
73
+ const AuthorCard = ({ author, ...boxProps }) => {
74
+ const { t } = reactI18next.useTranslation("author");
75
+ return /* @__PURE__ */ jsxRuntime.jsxs(react$1.Card, { as: "article", variant: "filled", ...boxProps, children: [
76
+ /* @__PURE__ */ jsxRuntime.jsx(react$1.CardHeader, { pb: 0, children: /* @__PURE__ */ jsxRuntime.jsx(react$1.Heading, { size: "md", children: t("title") }) }),
77
+ /* @__PURE__ */ jsxRuntime.jsx(react$1.CardBody, { children: /* @__PURE__ */ jsxRuntime.jsx(Author, { author, variant: "full" }) })
78
+ ] });
79
+ };
80
+ const BonusCardContent = ({ content, buttonColor }) => {
81
+ const { t } = reactI18next.useTranslation("author");
82
+ return /* @__PURE__ */ jsxRuntime.jsx(react$1.Popover, { autoFocus: false, isLazy: true, lazyBehavior: "keepMounted", children: ({ isOpen }) => /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
83
+ /* @__PURE__ */ jsxRuntime.jsx(react$1.PopoverTrigger, { children: /* @__PURE__ */ jsxRuntime.jsx(react$1.Button, { size: "sm", variant: "link", color: buttonColor, children: isOpen ? t("action.collapse") : t("action.expand") }) }),
84
+ /* @__PURE__ */ jsxRuntime.jsx(react$1.Portal, { children: /* @__PURE__ */ jsxRuntime.jsx(react$1.PopoverContent, { children: /* @__PURE__ */ jsxRuntime.jsx(react$1.PopoverBody, { children: Array.isArray(content) ? /* @__PURE__ */ jsxRuntime.jsx(react$1.Stack, { children: content.map((paragraph, index2) => /* @__PURE__ */ jsxRuntime.jsx(react$1.Text, { as: "span", children: paragraph }, index2)) }) : /* @__PURE__ */ jsxRuntime.jsx(react$1.Text, { children: content }) }) }) })
85
+ ] }) });
86
+ };
87
+ const BonusCardTitle = ({ content, color, textColor }) => {
88
+ return /* @__PURE__ */ jsxRuntime.jsx(
89
+ react$1.Text,
90
+ {
91
+ as: "h3",
92
+ display: "inline-block",
93
+ py: 1,
94
+ px: 2,
95
+ borderRadius: "md",
96
+ bg: color,
97
+ fontSize: "md",
98
+ fontWeight: "bold",
99
+ color: textColor,
100
+ children: content
101
+ }
102
+ );
103
+ };
104
+ const BonusCard = ({
105
+ title,
106
+ subtitle,
107
+ content,
108
+ link,
109
+ image,
110
+ color = "linear-gradient(90deg, #3b1f47, #731d58)",
111
+ textColor = "whiteAlpha.900",
112
+ titleColor = "yellow",
113
+ titleTextColor = "black",
114
+ className
115
+ }) => {
116
+ return /* @__PURE__ */ jsxRuntime.jsxs(
117
+ react$1.Card,
118
+ {
119
+ as: "article",
120
+ h: "full",
121
+ color: textColor,
122
+ bg: color,
123
+ _before: image ? {
124
+ content: '""',
125
+ position: "absolute",
126
+ top: 0,
127
+ left: 0,
128
+ w: "100%",
129
+ h: "100%",
130
+ bgImage: `url(${image})`,
131
+ bgSize: "cover",
132
+ bgPosition: "center",
133
+ filter: "blur(0.05em) opacity(50%)",
134
+ zIndex: 0
135
+ } : void 0,
136
+ className,
137
+ children: [
138
+ /* @__PURE__ */ jsxRuntime.jsxs(react$1.CardBody, { as: "section", pb: 0, flex: 1, children: [
139
+ /* @__PURE__ */ jsxRuntime.jsx(BonusCardTitle, { content: title, color: titleColor, textColor: titleTextColor }),
140
+ /* @__PURE__ */ jsxRuntime.jsx(react$1.Text, { fontSize: "2xl", fontWeight: "bold", my: 2, children: subtitle }),
141
+ /* @__PURE__ */ jsxRuntime.jsx(BonusCardContent, { content, buttonColor: textColor })
142
+ ] }),
143
+ /* @__PURE__ */ jsxRuntime.jsx(react$1.CardFooter, { as: "footer", p: 4, children: /* @__PURE__ */ jsxRuntime.jsx(index$1.LinkButton, { ...link, width: "full", size: "md", textDecoration: "none" }) })
144
+ ]
145
+ }
146
+ );
147
+ };
148
+ const BonusCardGrid = ({
149
+ items,
150
+ columns = { base: 1, md: 2, lg: 3 },
151
+ gap = 4,
152
+ cardCustomization,
153
+ ...boxProps
154
+ }) => {
155
+ return /* @__PURE__ */ jsxRuntime.jsx(
156
+ Grid,
157
+ {
158
+ items,
159
+ columns,
160
+ gap,
161
+ render: (item) => /* @__PURE__ */ jsxRuntime.jsx(BonusCard, { ...item, ...cardCustomization }),
162
+ ...boxProps
163
+ }
164
+ );
165
+ };
166
+ const Faq = ({ items, ...boxProps }) => {
167
+ const { bgColor, invertedColor } = index$2.usePrimaryColors();
168
+ return /* @__PURE__ */ jsxRuntime.jsx(react$1.Accordion, { allowToggle: true, ...boxProps, children: items.map(({ question, answer }) => {
169
+ return /* @__PURE__ */ jsxRuntime.jsxs(react$1.AccordionItem, { border: 0, children: [
170
+ /* @__PURE__ */ jsxRuntime.jsx(react$1.Box, { as: "h3", children: /* @__PURE__ */ jsxRuntime.jsxs(react$1.AccordionButton, { _hover: { color: invertedColor, bgColor }, children: [
171
+ /* @__PURE__ */ jsxRuntime.jsx(react$1.Box, { as: "span", flex: "1", textAlign: "left", fontWeight: "bold", children: question }),
172
+ /* @__PURE__ */ jsxRuntime.jsx(react$1.AccordionIcon, {})
173
+ ] }) }),
174
+ /* @__PURE__ */ jsxRuntime.jsx(react$1.AccordionPanel, { children: answer })
175
+ ] }, question);
176
+ }) });
177
+ };
178
+ const FeatureCard = ({ title, description }) => {
179
+ return /* @__PURE__ */ jsxRuntime.jsxs(react$1.Card, { as: "article", variant: "outline", textAlign: "center", h: "100%", children: [
180
+ /* @__PURE__ */ jsxRuntime.jsxs(react$1.CardHeader, { as: "header", display: "flex", alignItems: "center", justifyContent: "center", gap: 2, pb: 2, children: [
181
+ /* @__PURE__ */ jsxRuntime.jsx(icons.StarIcon, { w: 8, h: 8, color: "yellow.400" }),
182
+ /* @__PURE__ */ jsxRuntime.jsx(react$1.Text, { fontWeight: 600, children: title }),
183
+ /* @__PURE__ */ jsxRuntime.jsx(icons.StarIcon, { w: 8, h: 8, color: "yellow.400" })
184
+ ] }),
185
+ /* @__PURE__ */ jsxRuntime.jsx(react$1.CardBody, { as: "section", pt: 0, children: /* @__PURE__ */ jsxRuntime.jsx(react$1.Text, { color: "gray.500", children: description }) })
186
+ ] });
187
+ };
188
+ const FeatureCardGrid = ({
189
+ items,
190
+ columns = { base: 1, md: 2, lg: 3 },
191
+ gap = 4,
192
+ ...boxProps
193
+ }) => {
194
+ return /* @__PURE__ */ jsxRuntime.jsx(
195
+ Grid,
196
+ {
197
+ items,
198
+ columns,
199
+ gap,
200
+ getKey: ({ title }) => title,
201
+ render: (item) => /* @__PURE__ */ jsxRuntime.jsx(FeatureCard, { ...item }),
202
+ ...boxProps
203
+ }
204
+ );
205
+ };
206
+ const GameCard = ({ name, description, image, url, height = "auto" }) => {
207
+ return /* @__PURE__ */ jsxRuntime.jsxs(
208
+ react$1.LinkBox,
209
+ {
210
+ as: "article",
211
+ rounded: "md",
212
+ borderWidth: 1,
213
+ transition: "transform 0.2s ease",
214
+ cursor: url ? "pointer" : "default",
215
+ overflow: "hidden",
216
+ bg: "blackAlpha.200",
217
+ height,
218
+ _hover: { transform: "scale(1.05)" },
219
+ children: [
220
+ /* @__PURE__ */ jsxRuntime.jsx(index.Image, { src: image, alt: name, mode: "thumbnail" }),
221
+ /* @__PURE__ */ jsxRuntime.jsxs(react$1.Box, { as: "section", rounded: "md", p: 4, children: [
222
+ /* @__PURE__ */ jsxRuntime.jsx(react$1.Text, { as: "span", children: url ? /* @__PURE__ */ jsxRuntime.jsx(react$1.LinkOverlay, { as: index.Link, to: url, children: name }) : name }),
223
+ !!description && /* @__PURE__ */ jsxRuntime.jsx(react$1.Text, { fontSize: "sm", color: "gray.600", children: description })
224
+ ] })
225
+ ]
226
+ }
227
+ );
228
+ };
229
+ const GameCardGrid = ({
230
+ items,
231
+ columns = { base: 1, sm: 2, md: 3, lg: 4 },
232
+ gap = 4,
233
+ cardHeight = "full",
234
+ order = "default",
235
+ randomSeed,
236
+ ...boxProps
237
+ }) => {
238
+ let sortedItems = items;
239
+ if (order === "random") {
240
+ sortedItems = [...items].sort(randomSeed ? index$3.getSeededRandomComparator(randomSeed) : index$3.randomComparator);
241
+ }
242
+ return /* @__PURE__ */ jsxRuntime.jsx(
243
+ Grid,
244
+ {
245
+ items: sortedItems,
246
+ columns,
247
+ gap,
248
+ render: (item) => /* @__PURE__ */ jsxRuntime.jsx(GameCard, { ...item, height: cardHeight }),
249
+ ...boxProps
250
+ }
251
+ );
252
+ };
253
+ const GameDemoContent = ({
254
+ src,
255
+ isFullscreen,
256
+ isLoaded,
257
+ onLoad,
258
+ onExit,
259
+ onToggleFullscreen
260
+ }) => {
261
+ const { t } = reactI18next.useTranslation("gameDemo");
262
+ return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
263
+ /* @__PURE__ */ jsxRuntime.jsx(
264
+ react$1.Box,
265
+ {
266
+ as: "iframe",
267
+ src,
268
+ sandbox: "allow-scripts allow-same-origin",
269
+ loading: "lazy",
270
+ w: "100%",
271
+ h: "100%",
272
+ allowFullScreen: true,
273
+ onLoad,
274
+ children: /* @__PURE__ */ jsxRuntime.jsx("p", { children: t("warning") })
275
+ }
276
+ ),
277
+ /* @__PURE__ */ jsxRuntime.jsxs(react$1.Flex, { position: "absolute", top: 2, left: 2, gap: 2, children: [
278
+ /* @__PURE__ */ jsxRuntime.jsx(
279
+ react$1.IconButton,
280
+ {
281
+ icon: /* @__PURE__ */ jsxRuntime.jsx(icons.CloseIcon, { w: 3, h: 3 }),
282
+ title: t("action.exit"),
283
+ "aria-label": t("action.exit"),
284
+ size: "sm",
285
+ color: "white",
286
+ variant: "ghost",
287
+ disabled: !isLoaded,
288
+ isRound: true,
289
+ onClick: onExit
290
+ }
291
+ ),
292
+ /* @__PURE__ */ jsxRuntime.jsx(
293
+ react$1.IconButton,
294
+ {
295
+ icon: isFullscreen ? /* @__PURE__ */ jsxRuntime.jsx(icons.ViewOffIcon, { w: 3, h: 3 }) : /* @__PURE__ */ jsxRuntime.jsx(icons.ViewIcon, { w: 4, h: 4 }),
296
+ title: t(isFullscreen ? "action.deactivateFullscreen" : "action.activateFullscreen"),
297
+ "aria-label": t(isFullscreen ? "action.deactivateFullscreen" : "action.activateFullscreen"),
298
+ size: "sm",
299
+ color: "white",
300
+ variant: "ghost",
301
+ disabled: !isLoaded,
302
+ isRound: true,
303
+ onClick: onToggleFullscreen
304
+ }
305
+ )
306
+ ] }),
307
+ /* @__PURE__ */ jsxRuntime.jsx(react$1.AbsoluteCenter, { children: /* @__PURE__ */ jsxRuntime.jsx(react$1.Spinner, { size: "xl", thickness: "0.6rem", display: isLoaded ? "none" : "block", color: "brand.100" }) })
308
+ ] });
309
+ };
310
+ const GameDemoPreview = ({ image, alt, href, imageFit = "contain", onPlayDemo }) => {
311
+ const { t } = reactI18next.useTranslation("gameDemo");
312
+ return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
313
+ /* @__PURE__ */ jsxRuntime.jsx(index.Image, { src: image, alt, objectFit: imageFit, w: "100%", h: "100%" }),
314
+ /* @__PURE__ */ jsxRuntime.jsx(react$1.AbsoluteCenter, { children: /* @__PURE__ */ jsxRuntime.jsxs(react$1.Stack, { spacing: 4, children: [
315
+ /* @__PURE__ */ jsxRuntime.jsx(
316
+ index$1.LinkButton,
317
+ {
318
+ animation: { type: "pulse", params: { duration: 2, timingFunction: "ease-out", isInfinite: true } },
319
+ ...href ? { label: t("action.playForReal"), href } : { label: t("action.playForFree"), onClick: onPlayDemo }
320
+ }
321
+ ),
322
+ !!href && /* @__PURE__ */ jsxRuntime.jsx(
323
+ react$1.Button,
324
+ {
325
+ variant: "solid",
326
+ colorScheme: "brand",
327
+ size: { base: "sm", md: "lg" },
328
+ _active: { transform: "scale(0.95)" },
329
+ onClick: onPlayDemo,
330
+ children: t("action.playForFree")
331
+ }
332
+ )
333
+ ] }) })
334
+ ] });
335
+ };
336
+ const GameDemo = ({ name, src, href, previewImage, previewImageFit, ...boxProps }) => {
337
+ const [isRunning, setIsRunning] = react.useState(false);
338
+ const [isLoaded, setIsLoaded] = react.useState(false);
339
+ const { isOpen: isFullscreen, onToggle, onClose } = react$1.useDisclosure({ defaultIsOpen: false });
340
+ function handleLoad() {
341
+ setIsLoaded(true);
342
+ }
343
+ function handleExit() {
344
+ document.body.style.overflowY = "auto";
345
+ onClose();
346
+ setIsRunning(false);
347
+ }
348
+ function handleToggleFullscreen() {
349
+ document.body.style.overflowY = isFullscreen ? "auto" : "hidden";
350
+ onToggle();
351
+ }
352
+ function handlePlayDemo() {
353
+ setIsRunning(true);
354
+ }
355
+ return /* @__PURE__ */ jsxRuntime.jsx(
356
+ react$1.Box,
357
+ {
358
+ as: "article",
359
+ display: "grid",
360
+ w: "100%",
361
+ aspectRatio: "16/9 auto",
362
+ ...isFullscreen ? { zIndex: 100, inset: 0, position: "fixed", h: "100dvh" } : { position: "relative" },
363
+ ...boxProps,
364
+ children: isRunning ? /* @__PURE__ */ jsxRuntime.jsx(
365
+ GameDemoContent,
366
+ {
367
+ src,
368
+ isFullscreen,
369
+ isLoaded,
370
+ onLoad: handleLoad,
371
+ onExit: handleExit,
372
+ onToggleFullscreen: handleToggleFullscreen
373
+ }
374
+ ) : /* @__PURE__ */ jsxRuntime.jsx(
375
+ GameDemoPreview,
376
+ {
377
+ image: previewImage,
378
+ alt: name,
379
+ href,
380
+ imageFit: previewImageFit,
381
+ onPlayDemo: handlePlayDemo
382
+ }
383
+ )
384
+ }
385
+ );
386
+ };
387
+ const GameInfoItem = ({ title, value }) => {
388
+ return /* @__PURE__ */ jsxRuntime.jsxs(react$1.Flex, { gap: 2, children: [
389
+ /* @__PURE__ */ jsxRuntime.jsxs(react$1.Text, { w: "50%", color: "gray.500", textTransform: "capitalize", children: [
390
+ title,
391
+ ":"
392
+ ] }),
393
+ /* @__PURE__ */ jsxRuntime.jsx(react$1.Text, { w: "50%", textTransform: "capitalize", children: value })
394
+ ] });
395
+ };
396
+ const MAX_VISIBLE_LANGUAGE = 5;
397
+ function stringifyHasFeature(value) {
398
+ return i18next.t(`gameInfo:value.boolean.${value}`);
399
+ }
400
+ function stringifyVolatility(value) {
401
+ return i18next.t(`gameInfo:value.volatility.${value}`);
402
+ }
403
+ function stringifyArray(array, max) {
404
+ const safeMax = typeof max === "number" ? Math.max(max, 0) : null;
405
+ if (safeMax && array.length > safeMax) {
406
+ return `${array.slice(0, safeMax).join(", ")}, +${array.length - safeMax}`;
407
+ }
408
+ return array.join(", ");
409
+ }
410
+ function getGameInfoItemValue(key, value, locale) {
411
+ let formattedValue = "";
412
+ if (typeof value !== "string") {
413
+ if (key === index$4.GameCharacteristic.Rtp) {
414
+ formattedValue = index$3.formatNumber(value, { percent: "real", precision: 3 });
415
+ }
416
+ if (key === index$4.GameCharacteristic.MinBet || key === index$4.GameCharacteristic.MaxBet || key === index$4.GameCharacteristic.MaxWin) {
417
+ formattedValue = index$3.formatNumber(value, { locale });
418
+ }
419
+ if (key === index$4.GameCharacteristic.Compatibility || key === index$4.GameCharacteristic.BonusFeatures) {
420
+ formattedValue = stringifyArray(value);
421
+ }
422
+ if (key === index$4.GameCharacteristic.Languages) {
423
+ formattedValue = stringifyArray(value, MAX_VISIBLE_LANGUAGE);
424
+ }
425
+ if (typeof value === "boolean") {
426
+ formattedValue = stringifyHasFeature(value);
427
+ }
428
+ }
429
+ if (key === index$4.GameCharacteristic.ReleaseDate) {
430
+ formattedValue = index$5.formatDate({ value, locale, options: { year: "numeric", month: "long" } });
431
+ }
432
+ if (key === index$4.GameCharacteristic.Volatility && Object.values(index$4.GameVolatility).includes(value)) {
433
+ formattedValue = stringifyVolatility(value);
434
+ }
435
+ if (!formattedValue) {
436
+ formattedValue = value.toLocaleString();
437
+ }
438
+ return formattedValue;
439
+ }
440
+ const DEFAULT_CURRENCY = "$, €, £";
441
+ function getGameInfoCurrency(currency, locale) {
442
+ const currencies = Array.isArray(currency) ? currency.map((code) => index$3.getCurrencySymbol(code, locale)) : [index$3.getCurrencySymbol(currency, locale)];
443
+ return stringifyArray(currencies);
444
+ }
445
+ const GameInfo = ({ info, currencies }) => {
446
+ const { t } = reactI18next.useTranslation("gameInfo");
447
+ const { currentLocale } = index.usePageContext();
448
+ const currency = (currencies == null ? void 0 : currencies.length) ? getGameInfoCurrency(currencies, currentLocale.code) : DEFAULT_CURRENCY;
449
+ return /* @__PURE__ */ jsxRuntime.jsx(
450
+ react$1.Box,
451
+ {
452
+ as: "aside",
453
+ float: { base: "none", lg: "right" },
454
+ w: { base: "100%", lg: "xs" },
455
+ ml: { base: 0, lg: 4 },
456
+ mb: { base: 0, lg: 4 },
457
+ children: /* @__PURE__ */ jsxRuntime.jsxs(react$1.Card, { as: "article", variant: "outline", h: "100%", p: 2, children: [
458
+ /* @__PURE__ */ jsxRuntime.jsx(react$1.CardHeader, { as: "header", p: 0, children: /* @__PURE__ */ jsxRuntime.jsx(react$1.Heading, { as: "h2", fontSize: "xl", children: t("title") }) }),
459
+ /* @__PURE__ */ jsxRuntime.jsx(react$1.CardBody, { as: "section", p: 0, children: Object.entries(info).map(([group, items]) => /* @__PURE__ */ jsxRuntime.jsxs(react.Fragment, { children: [
460
+ /* @__PURE__ */ jsxRuntime.jsx(react$1.Divider, { my: 2 }),
461
+ /* @__PURE__ */ jsxRuntime.jsx(react$1.Text, { fontWeight: "semibold", mb: 2, children: t(`group.${group}`) }),
462
+ Object.entries(items).map(([itemKey, itemValue]) => {
463
+ if (!itemValue) {
464
+ return null;
465
+ }
466
+ const feature = itemKey;
467
+ const value = getGameInfoItemValue(feature, itemValue, currentLocale.code);
468
+ return /* @__PURE__ */ jsxRuntime.jsx(GameInfoItem, { title: t(`feature.${feature}`, { currency }), value }, itemKey);
469
+ })
470
+ ] }, group)) })
471
+ ] })
472
+ }
473
+ );
474
+ };
475
+ const HowTo = ({ steps, ...boxProps }) => {
476
+ const { bgColor, invertedColor } = index$2.usePrimaryColors();
477
+ return /* @__PURE__ */ jsxRuntime.jsx(react$1.SimpleGrid, { as: "ol", columns: { base: 1, md: 2, lg: 3 }, gap: 4, p: 0, ...boxProps, children: steps.map(({ title, description, thumbnail }, index$12) => /* @__PURE__ */ jsxRuntime.jsxs(react$1.Flex, { as: "li", alignItems: "flex-start", gap: 4, children: [
478
+ /* @__PURE__ */ jsxRuntime.jsx(react$1.Circle, { size: 12, bgColor, color: invertedColor, fontSize: "lg", fontWeight: "bold", children: String(index$12 + 1) }),
479
+ /* @__PURE__ */ jsxRuntime.jsxs(react$1.Stack, { flex: 1, children: [
480
+ /* @__PURE__ */ jsxRuntime.jsx(react$1.Text, { fontSize: "lg", fontWeight: "bold", children: title }),
481
+ /* @__PURE__ */ jsxRuntime.jsx(index.Image, { src: thumbnail, alt: title, mode: "thumbnail", hasZoom: true }),
482
+ /* @__PURE__ */ jsxRuntime.jsx(react$1.Text, { children: description })
483
+ ] })
484
+ ] }, index$12)) });
485
+ };
486
+ const List = ({ items, bullet = "—", render, ...boxProps }) => {
487
+ return /* @__PURE__ */ jsxRuntime.jsx(react$1.List, { pl: 0, ml: 2, ...boxProps, children: items.map((item, index2) => /* @__PURE__ */ jsxRuntime.jsxs(react$1.ListItem, { display: "flex", gap: 1, children: [
488
+ /* @__PURE__ */ jsxRuntime.jsx(react$1.Box, { children: bullet }),
489
+ render ? render(item) : item
490
+ ] }, index2)) });
491
+ };
492
+ const NotFound = () => {
493
+ const { t } = reactI18next.useTranslation("pageNotFound");
494
+ return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
495
+ /* @__PURE__ */ jsxRuntime.jsx(index$6.Heading1, { children: t("title") }),
496
+ /* @__PURE__ */ jsxRuntime.jsxs(index$6.Paragraph, { fontSize: "xl", children: [
497
+ t("description"),
498
+ " ",
499
+ /* @__PURE__ */ jsxRuntime.jsx(react$1.Button, { as: index.Link, to: "/", variant: "link", colorScheme: "brand", fontSize: "xl", children: t("action") })
500
+ ] })
501
+ ] });
502
+ };
503
+ const CookiePolicy = () => {
504
+ const { t } = reactI18next.useTranslation("pageCookiePolicy");
505
+ const { metadata } = index.useSiteContext();
506
+ const { name: siteName } = metadata;
507
+ return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
508
+ /* @__PURE__ */ jsxRuntime.jsx(index$6.Heading1, { children: t("title") }),
509
+ /* @__PURE__ */ jsxRuntime.jsx(index$6.Paragraph, { children: t("text", { siteName }) }),
510
+ /* @__PURE__ */ jsxRuntime.jsx(index$6.Heading2, { children: t("sectionOne.title", { siteName }) }),
511
+ /* @__PURE__ */ jsxRuntime.jsx(index$6.Paragraph, { children: t("sectionOne.textOne", { siteName }) }),
512
+ /* @__PURE__ */ jsxRuntime.jsx(index$6.Paragraph, { children: t("sectionOne.textTwo") }),
513
+ /* @__PURE__ */ jsxRuntime.jsx(index$6.Heading2, { children: t("sectionTwo.title") }),
514
+ /* @__PURE__ */ jsxRuntime.jsx(index$6.Paragraph, { children: t("sectionTwo.textOne", { siteName }) }),
515
+ /* @__PURE__ */ jsxRuntime.jsxs(index$6.Unordered, { children: [
516
+ /* @__PURE__ */ jsxRuntime.jsx("li", { children: t("sectionTwo.list.itemOne") }),
517
+ /* @__PURE__ */ jsxRuntime.jsx("li", { children: t("sectionTwo.list.itemTwo") }),
518
+ /* @__PURE__ */ jsxRuntime.jsx("li", { children: t("sectionTwo.list.itemThree") })
519
+ ] }),
520
+ /* @__PURE__ */ jsxRuntime.jsx(index$6.Paragraph, { children: t("sectionTwo.textTwo") }),
521
+ /* @__PURE__ */ jsxRuntime.jsx(index$6.Heading2, { children: t("sectionThree.title") }),
522
+ /* @__PURE__ */ jsxRuntime.jsxs(index$6.Ordered, { children: [
523
+ /* @__PURE__ */ jsxRuntime.jsx("li", { children: t("sectionThree.list.itemOne") }),
524
+ /* @__PURE__ */ jsxRuntime.jsx("li", { children: t("sectionThree.list.itemTwo") }),
525
+ /* @__PURE__ */ jsxRuntime.jsx("li", { children: t("sectionThree.list.itemThree") }),
526
+ /* @__PURE__ */ jsxRuntime.jsx("li", { children: t("sectionThree.list.itemFour") })
527
+ ] }),
528
+ /* @__PURE__ */ jsxRuntime.jsx(index$6.Paragraph, { children: t("sectionThree.text", { siteName }) })
529
+ ] });
530
+ };
531
+ const ContactForm = ({ ...boxProps }) => {
532
+ const toast = react$1.useToast();
533
+ const { t } = reactI18next.useTranslation("contactForm");
534
+ function handleSubmit(event) {
535
+ event.preventDefault();
536
+ const form = event.currentTarget;
537
+ const formData = new FormData(form);
538
+ const name = formData.get("name");
539
+ const email = formData.get("email");
540
+ const message = formData.get("message");
541
+ if (name && email && message) {
542
+ form.reset();
543
+ toast({
544
+ title: t("notification.title", { name }),
545
+ description: t("notification.description", { email }),
546
+ colorScheme: "brand",
547
+ status: "success",
548
+ duration: 5e3,
549
+ isClosable: true
550
+ });
551
+ } else {
552
+ console.error("Please fill out both fields");
553
+ }
554
+ }
555
+ return /* @__PURE__ */ jsxRuntime.jsx(
556
+ react$1.Box,
557
+ {
558
+ as: "form",
559
+ borderRadius: "lg",
560
+ p: 8,
561
+ color: react$1.useColorModeValue("gray.700", "whiteAlpha.900"),
562
+ bg: react$1.useColorModeValue("white", "gray.700"),
563
+ shadow: "base",
564
+ onSubmit: handleSubmit,
565
+ ...boxProps,
566
+ children: /* @__PURE__ */ jsxRuntime.jsxs(react$1.VStack, { spacing: 4, children: [
567
+ /* @__PURE__ */ jsxRuntime.jsxs(react$1.FormControl, { isRequired: true, children: [
568
+ /* @__PURE__ */ jsxRuntime.jsx(react$1.FormLabel, { children: t("field.name.label") }),
569
+ /* @__PURE__ */ jsxRuntime.jsxs(react$1.InputGroup, { children: [
570
+ /* @__PURE__ */ jsxRuntime.jsx(react$1.InputLeftElement, { children: /* @__PURE__ */ jsxRuntime.jsx(
571
+ "svg",
572
+ {
573
+ xmlns: "http://www.w3.org/2000/svg",
574
+ width: "16",
575
+ height: "16",
576
+ fill: "currentColor",
577
+ className: "bi bi-person-fill",
578
+ viewBox: "0 0 16 16",
579
+ children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M3 14s-1 0-1-1 1-4 6-4 6 3 6 4-1 1-1 1zm5-6a3 3 0 1 0 0-6 3 3 0 0 0 0 6" })
580
+ }
581
+ ) }),
582
+ /* @__PURE__ */ jsxRuntime.jsx(react$1.Input, { type: "text", name: "name", placeholder: t("field.name.placeholder") })
583
+ ] })
584
+ ] }),
585
+ /* @__PURE__ */ jsxRuntime.jsxs(react$1.FormControl, { isRequired: true, children: [
586
+ /* @__PURE__ */ jsxRuntime.jsx(react$1.FormLabel, { children: t("field.email.label") }),
587
+ /* @__PURE__ */ jsxRuntime.jsxs(react$1.InputGroup, { children: [
588
+ /* @__PURE__ */ jsxRuntime.jsx(react$1.InputLeftElement, { children: /* @__PURE__ */ jsxRuntime.jsx(icons.EmailIcon, {}) }),
589
+ /* @__PURE__ */ jsxRuntime.jsx(react$1.Input, { type: "email", name: "email", placeholder: t("field.email.placeholder") })
590
+ ] })
591
+ ] }),
592
+ /* @__PURE__ */ jsxRuntime.jsxs(react$1.FormControl, { isRequired: true, children: [
593
+ /* @__PURE__ */ jsxRuntime.jsx(react$1.FormLabel, { children: t("field.message.label") }),
594
+ /* @__PURE__ */ jsxRuntime.jsx(react$1.Textarea, { name: "message", placeholder: t("field.message.placeholder"), rows: 6, resize: "none" })
595
+ ] }),
596
+ /* @__PURE__ */ jsxRuntime.jsx(react$1.Button, { type: "submit", colorScheme: "brand", width: "full", children: t("action.send") })
597
+ ] })
598
+ }
599
+ );
600
+ };
601
+ const Contacts = () => {
602
+ const { t } = reactI18next.useTranslation("pageContacts");
603
+ return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
604
+ /* @__PURE__ */ jsxRuntime.jsx(index$6.Heading1, { children: t("title") }),
605
+ /* @__PURE__ */ jsxRuntime.jsx(index$6.Paragraph, { children: t("text") }),
606
+ /* @__PURE__ */ jsxRuntime.jsx(ContactForm, {})
607
+ ] });
608
+ };
609
+ const PrivacyPolicy = ({ contactsSlug }) => {
610
+ const { t } = reactI18next.useTranslation("pagePrivacyPolicy");
611
+ const { metadata } = index.useSiteContext();
612
+ const { name: siteName } = metadata;
613
+ return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
614
+ /* @__PURE__ */ jsxRuntime.jsx(index$6.Heading1, { children: t("title") }),
615
+ /* @__PURE__ */ jsxRuntime.jsx(index$6.Paragraph, { children: t("text") }),
616
+ /* @__PURE__ */ jsxRuntime.jsx(index$6.Heading2, { children: t("sectionOne.title", { siteName }) }),
617
+ /* @__PURE__ */ jsxRuntime.jsx(index$6.Paragraph, { children: t("sectionOne.text", { siteName }) }),
618
+ /* @__PURE__ */ jsxRuntime.jsx(index$6.Heading2, { children: t("sectionTwo.title") }),
619
+ /* @__PURE__ */ jsxRuntime.jsx(index$6.Paragraph, { children: t("sectionTwo.textOne") }),
620
+ /* @__PURE__ */ jsxRuntime.jsxs(index$6.Unordered, { children: [
621
+ /* @__PURE__ */ jsxRuntime.jsx("li", { children: t("sectionTwo.list.itemOne") }),
622
+ /* @__PURE__ */ jsxRuntime.jsx("li", { children: t("sectionTwo.list.itemTwo") })
623
+ ] }),
624
+ /* @__PURE__ */ jsxRuntime.jsx(index$6.Paragraph, { children: t("sectionTwo.textTwo") }),
625
+ /* @__PURE__ */ jsxRuntime.jsx(index$6.Heading2, { children: t("sectionThree.title") }),
626
+ /* @__PURE__ */ jsxRuntime.jsx(index$6.Paragraph, { children: t("sectionThree.text") }),
627
+ /* @__PURE__ */ jsxRuntime.jsx(index$6.Heading2, { children: t("sectionFour.title") }),
628
+ /* @__PURE__ */ jsxRuntime.jsx(index$6.Paragraph, { children: t("sectionFour.text") }),
629
+ /* @__PURE__ */ jsxRuntime.jsx(index$6.Heading2, { children: t("sectionFive.title") }),
630
+ /* @__PURE__ */ jsxRuntime.jsx(index$6.Paragraph, { children: t("sectionFive.text", { siteName }) }),
631
+ /* @__PURE__ */ jsxRuntime.jsx(index$6.Heading2, { children: t("sectionSix.title") }),
632
+ contactsSlug ? /* @__PURE__ */ jsxRuntime.jsxs(index$6.Paragraph, { children: [
633
+ t("sectionSix.textWithLink.contentStart"),
634
+ /* @__PURE__ */ jsxRuntime.jsx(index.Link, { color: "brand.400", to: contactsSlug, children: t("sectionSix.textWithLink.link") }),
635
+ t("sectionSix.textWithLink.contentEnd", { siteName })
636
+ ] }) : /* @__PURE__ */ jsxRuntime.jsx(index$6.Paragraph, { children: t("sectionSix.text", { siteName }) })
637
+ ] });
638
+ };
639
+ const TermsAndConditions = ({ privacyPolicySlug }) => {
640
+ const { t } = reactI18next.useTranslation("pageTermsAndConditions");
641
+ const { metadata } = index.useSiteContext();
642
+ const { name: siteName } = metadata;
643
+ return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
644
+ /* @__PURE__ */ jsxRuntime.jsx(index$6.Heading1, { children: t("title") }),
645
+ /* @__PURE__ */ jsxRuntime.jsx(index$6.Paragraph, { children: t("text", { siteName }) }),
646
+ /* @__PURE__ */ jsxRuntime.jsx(index$6.Heading2, { children: t("sectionOne.title") }),
647
+ /* @__PURE__ */ jsxRuntime.jsx(index$6.Paragraph, { children: t("sectionOne.text", { siteName }) }),
648
+ /* @__PURE__ */ jsxRuntime.jsx(index$6.Unordered, { children: ["One", "Two", "Three", "Four"].map((i, index2) => /* @__PURE__ */ jsxRuntime.jsx("li", { children: /* @__PURE__ */ jsxRuntime.jsxs(index$6.Paragraph, { children: [
649
+ /* @__PURE__ */ jsxRuntime.jsxs("strong", { children: [
650
+ t(`sectionOne.list.item${i}.title`),
651
+ ":"
652
+ ] }),
653
+ /* @__PURE__ */ jsxRuntime.jsx("br", {}),
654
+ t(`sectionOne.list.item${i}.description`, { siteName })
655
+ ] }) }, index2)) }),
656
+ /* @__PURE__ */ jsxRuntime.jsx(index$6.Heading2, { children: t("sectionTwo.title") }),
657
+ /* @__PURE__ */ jsxRuntime.jsx(index$6.Ordered, { children: ["One", "Two", "Three", "Four"].map((i, index2) => /* @__PURE__ */ jsxRuntime.jsx("li", { children: /* @__PURE__ */ jsxRuntime.jsxs(index$6.Paragraph, { children: [
658
+ /* @__PURE__ */ jsxRuntime.jsxs("strong", { children: [
659
+ t(`sectionTwo.list.item${i}.title`),
660
+ ":"
661
+ ] }),
662
+ /* @__PURE__ */ jsxRuntime.jsx("br", {}),
663
+ t(`sectionTwo.list.item${i}.description`, { siteName })
664
+ ] }) }, index2)) }),
665
+ /* @__PURE__ */ jsxRuntime.jsx(index$6.Heading2, { children: t("sectionThree.title") }),
666
+ /* @__PURE__ */ jsxRuntime.jsx(index$6.Paragraph, { children: t("sectionThree.text", { siteName }) }),
667
+ /* @__PURE__ */ jsxRuntime.jsx(index$6.Heading2, { children: t("sectionFour.title") }),
668
+ /* @__PURE__ */ jsxRuntime.jsx(index$6.Paragraph, { children: t("sectionFour.text", { siteName }) }),
669
+ /* @__PURE__ */ jsxRuntime.jsx(index$6.Unordered, { children: ["One", "Two"].map((i, index2) => /* @__PURE__ */ jsxRuntime.jsx("li", { children: /* @__PURE__ */ jsxRuntime.jsxs(index$6.Paragraph, { children: [
670
+ /* @__PURE__ */ jsxRuntime.jsxs("strong", { children: [
671
+ t(`sectionFour.list.item${i}.title`),
672
+ ":"
673
+ ] }),
674
+ /* @__PURE__ */ jsxRuntime.jsx("br", {}),
675
+ t(`sectionFour.list.item${i}.description`, { siteName })
676
+ ] }) }, index2)) }),
677
+ /* @__PURE__ */ jsxRuntime.jsx(index$6.Heading2, { children: t("sectionFive.title") }),
678
+ /* @__PURE__ */ jsxRuntime.jsx(index$6.Paragraph, { children: t("sectionFive.text", { siteName }) }),
679
+ /* @__PURE__ */ jsxRuntime.jsx(index$6.Heading2, { children: t("sectionSix.title") }),
680
+ /* @__PURE__ */ jsxRuntime.jsx(index$6.Paragraph, { children: t("sectionSix.textOne") }),
681
+ /* @__PURE__ */ jsxRuntime.jsx(index$6.Unordered, { children: ["One", "Two", "Three"].map((i, index2) => /* @__PURE__ */ jsxRuntime.jsx("li", { children: t(`sectionSix.list.item${i}`) }, index2)) }),
682
+ privacyPolicySlug ? /* @__PURE__ */ jsxRuntime.jsxs(index$6.Paragraph, { children: [
683
+ t("sectionSix.textTwoWithLink.contentStart"),
684
+ /* @__PURE__ */ jsxRuntime.jsx(index.Link, { color: "brand.400", to: privacyPolicySlug, children: t("sectionSix.textTwoWithLink.link") }),
685
+ t("sectionSix.textTwoWithLink.contentEnd")
686
+ ] }) : /* @__PURE__ */ jsxRuntime.jsx(index$6.Paragraph, { children: t("sectionSix.textTwo") }),
687
+ /* @__PURE__ */ jsxRuntime.jsx(index$6.Heading2, { children: t("sectionSeven.title") }),
688
+ /* @__PURE__ */ jsxRuntime.jsx(index$6.Ordered, { children: ["One", "Two"].map((i, index2) => /* @__PURE__ */ jsxRuntime.jsx("li", { children: /* @__PURE__ */ jsxRuntime.jsxs(index$6.Paragraph, { children: [
689
+ /* @__PURE__ */ jsxRuntime.jsxs("strong", { children: [
690
+ t(`sectionSeven.list.item${i}.title`),
691
+ ":"
692
+ ] }),
693
+ /* @__PURE__ */ jsxRuntime.jsx("br", {}),
694
+ t(`sectionSeven.list.item${i}.description`, { siteName })
695
+ ] }) }, index2)) })
696
+ ] });
697
+ };
698
+ const TitleMap = {
699
+ pros: "advantages",
700
+ cons: "disadvantages"
701
+ };
702
+ const IconMap = {
703
+ pros: icons.CheckCircleIcon,
704
+ cons: icons.WarningIcon
705
+ };
706
+ const IconColorMap = {
707
+ pros: "green.500",
708
+ cons: "red.500"
709
+ };
710
+ const BgColorMap = {
711
+ pros: "green",
712
+ cons: "red"
713
+ };
714
+ const ProsConsCard = ({ itemType, items }) => {
715
+ const { t } = reactI18next.useTranslation("prosCons");
716
+ return /* @__PURE__ */ jsxRuntime.jsxs(
717
+ react$1.Card,
718
+ {
719
+ as: "article",
720
+ flex: 1,
721
+ p: 2,
722
+ bgColor: react$1.useColorModeValue(`${BgColorMap[itemType]}.100`, `${BgColorMap[itemType]}.800`),
723
+ children: [
724
+ /* @__PURE__ */ jsxRuntime.jsx(
725
+ react$1.CardHeader,
726
+ {
727
+ as: "header",
728
+ p: 2,
729
+ borderTopRadius: "md",
730
+ bgColor: react$1.useColorModeValue("whiteAlpha.800", "blackAlpha.800"),
731
+ children: /* @__PURE__ */ jsxRuntime.jsx(react$1.Heading, { as: "h3", textTransform: "uppercase", fontSize: "xl", children: t(TitleMap[itemType]) })
732
+ }
733
+ ),
734
+ /* @__PURE__ */ jsxRuntime.jsx(
735
+ react$1.CardBody,
736
+ {
737
+ as: "section",
738
+ p: 2,
739
+ borderBottomRadius: "md",
740
+ bgColor: react$1.useColorModeValue("whiteAlpha.800", "blackAlpha.800"),
741
+ children: /* @__PURE__ */ jsxRuntime.jsx(react$1.List, { spacing: 4, p: 0, children: items.map(({ title, description }) => /* @__PURE__ */ jsxRuntime.jsxs(react$1.ListItem, { display: "flex", children: [
742
+ /* @__PURE__ */ jsxRuntime.jsx(react$1.ListIcon, { as: IconMap[itemType], w: 6, h: 6, color: IconColorMap[itemType] }),
743
+ /* @__PURE__ */ jsxRuntime.jsxs(react$1.Text, { fontWeight: "semibold", fontSize: "md", children: [
744
+ title,
745
+ !!description && /* @__PURE__ */ jsxRuntime.jsxs(react$1.Text, { as: "span", fontWeight: "normal", children: [
746
+ ": ",
747
+ description
748
+ ] })
749
+ ] })
750
+ ] }, title)) })
751
+ }
752
+ )
753
+ ]
754
+ }
755
+ );
756
+ };
757
+ const ProsCons = ({ items, ...boxProps }) => {
758
+ const { pros, cons } = items;
759
+ return /* @__PURE__ */ jsxRuntime.jsxs(react$1.Flex, { as: "section", direction: { base: "column", md: "row" }, gap: 4, ...boxProps, children: [
760
+ /* @__PURE__ */ jsxRuntime.jsx(ProsConsCard, { itemType: "pros", items: pros }),
761
+ /* @__PURE__ */ jsxRuntime.jsx(ProsConsCard, { itemType: "cons", items: cons })
762
+ ] });
763
+ };
764
+ function replacePlaceholders(text, placeholders) {
765
+ Object.entries(placeholders).forEach(([placeholder, replacement]) => {
766
+ const regex = new RegExp(`{{${placeholder}}}`, "g");
767
+ text = text.replace(regex, replacement);
768
+ });
769
+ return text;
770
+ }
771
+ const Seo = ({ children, title, description, lang }) => {
772
+ const { metadata } = index.useSiteContext();
773
+ const { name: siteName, lang: defaultLang, seo } = metadata;
774
+ const { title: defaultTitle, description: defaultDescription } = seo;
775
+ const siteLang = lang || defaultLang;
776
+ const placeholders = react.useMemo(
777
+ () => ({
778
+ siteName,
779
+ currentYear: index$5.getCurrentYear(siteLang),
780
+ currentMonth: index$5.getCurrentMonth(siteLang)
781
+ }),
782
+ [siteName, siteLang]
783
+ );
784
+ return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
785
+ /* @__PURE__ */ jsxRuntime.jsx("html", { lang: siteLang }),
786
+ /* @__PURE__ */ jsxRuntime.jsx("title", { children: title ? typeof title === "string" ? replacePlaceholders(title, placeholders) : title(placeholders) : defaultTitle }),
787
+ /* @__PURE__ */ jsxRuntime.jsx(
788
+ "meta",
789
+ {
790
+ name: "description",
791
+ content: description ? typeof description === "string" ? replacePlaceholders(description, placeholders) : description(placeholders) : defaultDescription
792
+ }
793
+ ),
794
+ children
795
+ ] });
796
+ };
797
+ const Table = ({
798
+ columnNumber,
799
+ items,
800
+ caption,
801
+ bordered = false,
802
+ striped = true,
803
+ scrollable,
804
+ ...boxProps
805
+ }) => {
806
+ const headerItems = items.slice(0, columnNumber);
807
+ const bodyItems = items.slice(columnNumber);
808
+ return /* @__PURE__ */ jsxRuntime.jsx(
809
+ react$1.TableContainer,
810
+ {
811
+ border: bordered ? void 0 : "none",
812
+ ...scrollable ? { maxH: "50vh", overflowY: "auto" } : {},
813
+ ...boxProps,
814
+ children: /* @__PURE__ */ jsxRuntime.jsxs(react$1.Table, { variant: striped ? "striped" : "simple", children: [
815
+ /* @__PURE__ */ jsxRuntime.jsx(react$1.Thead, { ...scrollable ? { position: "sticky", top: 0, zIndex: 1, bg: "gray.800" } : {}, children: /* @__PURE__ */ jsxRuntime.jsx(react$1.Tr, { children: headerItems.map((item, index2) => /* @__PURE__ */ jsxRuntime.jsx(react$1.Th, { children: item }, index2)) }) }),
816
+ /* @__PURE__ */ jsxRuntime.jsx(react$1.Tbody, { children: Array.from({ length: Math.ceil(bodyItems.length / columnNumber) }, (_, rowIndex) => /* @__PURE__ */ jsxRuntime.jsx(react$1.Tr, { children: Array.from({ length: columnNumber }, (_2, colIndex) => /* @__PURE__ */ jsxRuntime.jsx(react$1.Td, { children: bodyItems[rowIndex * columnNumber + colIndex] || "" }, colIndex)) }, rowIndex)) }),
817
+ !!caption && /* @__PURE__ */ jsxRuntime.jsx(react$1.TableCaption, { children: caption })
818
+ ] })
819
+ }
820
+ );
821
+ };
822
+ const Tabs = ({ items, render, ...boxProps }) => {
823
+ const { tabs, panels } = react.useMemo(() => {
824
+ const tabs2 = [];
825
+ const panels2 = [];
826
+ items.forEach(({ content, ...tab }) => {
827
+ tabs2.push(tab);
828
+ panels2.push(content);
829
+ });
830
+ return { tabs: tabs2, panels: panels2 };
831
+ }, []);
832
+ return /* @__PURE__ */ jsxRuntime.jsxs(react$1.Tabs, { overflow: "hidden", colorScheme: "brand", ...boxProps, children: [
833
+ /* @__PURE__ */ jsxRuntime.jsx(react$1.TabList, { overflow: "auto hidden", children: tabs.map(({ label, icon }, index2) => /* @__PURE__ */ jsxRuntime.jsx(react$1.Tab, { children: /* @__PURE__ */ jsxRuntime.jsx(react$1.Text, { as: "h3", isTruncated: true, children: icon ? `${icon} ${label}` : label }) }, index2)) }),
834
+ /* @__PURE__ */ jsxRuntime.jsx(react$1.TabPanels, { children: panels.map((panel, index2) => /* @__PURE__ */ jsxRuntime.jsx(react$1.TabPanel, { children: render ? render(panel) : panel }, index2)) })
835
+ ] });
836
+ };
837
+ const Tip = ({ tip, author = null, ...boxProps }) => {
838
+ return /* @__PURE__ */ jsxRuntime.jsxs(
839
+ react$1.Card,
840
+ {
841
+ variant: "filled",
842
+ p: 4,
843
+ borderLeft: "4px solid gray",
844
+ gap: 4,
845
+ _before: {
846
+ content: '"❛❛"',
847
+ position: "absolute",
848
+ top: -8,
849
+ left: -2,
850
+ fontSize: "6rem",
851
+ fontStyle: "italic",
852
+ color: react$1.useColorModeValue("blackAlpha.300", "whiteAlpha.300")
853
+ },
854
+ ...boxProps,
855
+ children: [
856
+ /* @__PURE__ */ jsxRuntime.jsx(react$1.CardBody, { as: "blockquote", p: 0, fontStyle: "italic", children: tip }),
857
+ !!author && /* @__PURE__ */ jsxRuntime.jsx(react$1.CardFooter, { alignItems: "center", justify: "flex-end", p: 0, children: /* @__PURE__ */ jsxRuntime.jsx(Author, { author, variant: "short" }) })
858
+ ]
859
+ }
860
+ );
861
+ };
862
+ const ExternalImage = ({ image, component: ImageComponent, alt = "", ...imageProps }) => {
863
+ var _a, _b;
864
+ const imageData = (_b = (_a = image == null ? void 0 : image.localFile) == null ? void 0 : _a.childImageSharp) == null ? void 0 : _b.gatsbyImageData;
865
+ return imageData ? /* @__PURE__ */ jsxRuntime.jsx(ImageComponent, { image: imageData, alt, ...imageProps }) : null;
866
+ };
867
+ const RichText = ({ content }) => {
868
+ const components = react$2.useMDXComponents();
869
+ return /* @__PURE__ */ jsxRuntime.jsx(Markdown, { components, children: content });
870
+ };
871
+ function extractItemsFromJson(content) {
872
+ return content.strapi_json_value;
873
+ }
874
+ function extractCurrencies(currencyList) {
875
+ if (!currencyList) {
876
+ return [];
877
+ }
878
+ return [...new Set(currencyList.items.map(({ code }) => code))];
879
+ }
880
+ const StrapiComponent = ({ type, props, imageComponent }) => {
881
+ switch (type) {
882
+ case "STRAPI__COMPONENT_CONTENT_FAQ":
883
+ return /* @__PURE__ */ jsxRuntime.jsx(Faq, { items: props.items, mb: 4 });
884
+ case "STRAPI__COMPONENT_CONTENT_FEATURES":
885
+ return /* @__PURE__ */ jsxRuntime.jsx(FeatureCardGrid, { items: props.items, mb: 4 });
886
+ case "STRAPI__COMPONENT_CONTENT_GAME_CARDS":
887
+ return /* @__PURE__ */ jsxRuntime.jsx(
888
+ GameCardGrid,
889
+ {
890
+ items: props.items.map((item) => ({
891
+ ...item,
892
+ image: /* @__PURE__ */ jsxRuntime.jsx(
893
+ ExternalImage,
894
+ {
895
+ image: item.image,
896
+ alt: item.name,
897
+ component: imageComponent
898
+ }
899
+ )
900
+ })),
901
+ order: props.order ?? "default",
902
+ randomSeed: props.randomSeed ?? 0,
903
+ cardHeight: props.cardHeight ?? "full",
904
+ mb: 4
905
+ }
906
+ );
907
+ case "STRAPI__COMPONENT_CONTENT_GAME_CARD_TABS":
908
+ return /* @__PURE__ */ jsxRuntime.jsx(
909
+ Tabs,
910
+ {
911
+ items: props.items,
912
+ render: (items) => /* @__PURE__ */ jsxRuntime.jsx(
913
+ GameCardGrid,
914
+ {
915
+ items: items.map((item) => ({
916
+ ...item,
917
+ image: /* @__PURE__ */ jsxRuntime.jsx(
918
+ ExternalImage,
919
+ {
920
+ image: item.image,
921
+ alt: item.name,
922
+ component: imageComponent
923
+ }
924
+ )
925
+ }))
926
+ }
927
+ ),
928
+ mb: 4
929
+ }
930
+ );
931
+ case "STRAPI__COMPONENT_CONTENT_GAME_DEMO":
932
+ return /* @__PURE__ */ jsxRuntime.jsx(
933
+ GameDemo,
934
+ {
935
+ name: props.name,
936
+ src: props.src,
937
+ href: props.href,
938
+ previewImage: /* @__PURE__ */ jsxRuntime.jsx(ExternalImage, { image: props.previewImage, alt: props.name, component: imageComponent }),
939
+ mb: 4
940
+ }
941
+ );
942
+ case "STRAPI__COMPONENT_CONTENT_GAME_INFO":
943
+ return /* @__PURE__ */ jsxRuntime.jsx(
944
+ GameInfo,
945
+ {
946
+ info: { general: props.general, features: props.features },
947
+ currencies: extractCurrencies(props.currency)
948
+ }
949
+ );
950
+ case "STRAPI__COMPONENT_CONTENT_HOW_TO":
951
+ return /* @__PURE__ */ jsxRuntime.jsx(
952
+ HowTo,
953
+ {
954
+ steps: props.steps.map((step) => {
955
+ return {
956
+ ...step,
957
+ thumbnail: /* @__PURE__ */ jsxRuntime.jsx(ExternalImage, { image: step.thumbnail, alt: step.title, component: imageComponent })
958
+ };
959
+ }),
960
+ mb: 4
961
+ }
962
+ );
963
+ case "STRAPI__COMPONENT_CONTENT_LIST":
964
+ return /* @__PURE__ */ jsxRuntime.jsx(List, { bullet: props.bullet, items: extractItemsFromJson(props.content), mb: 4 });
965
+ case "STRAPI__COMPONENT_CONTENT_MEDIA":
966
+ return /* @__PURE__ */ jsxRuntime.jsx(
967
+ index.Image,
968
+ {
969
+ src: /* @__PURE__ */ jsxRuntime.jsx(ExternalImage, { component: imageComponent, image: props.file, alt: props.alternativeText }),
970
+ mb: 4,
971
+ hasZoom: true
972
+ }
973
+ );
974
+ case "STRAPI__COMPONENT_CONTENT_PROS_CONS":
975
+ return /* @__PURE__ */ jsxRuntime.jsx(ProsCons, { items: { ...props }, mb: 4 });
976
+ case "STRAPI__COMPONENT_CONTENT_RICH_TEXT":
977
+ return /* @__PURE__ */ jsxRuntime.jsx(RichText, { content: props.content.data.content });
978
+ case "STRAPI__COMPONENT_CONTENT_TABLE":
979
+ return /* @__PURE__ */ jsxRuntime.jsx(
980
+ Table,
981
+ {
982
+ columnNumber: props.columnNumber,
983
+ items: extractItemsFromJson(props.content),
984
+ caption: props.caption,
985
+ bordered: props.bordered,
986
+ scrollable: props.scrollable,
987
+ striped: props.striped,
988
+ mb: 4
989
+ }
990
+ );
991
+ case "STRAPI__COMPONENT_CONTENT_TIP":
992
+ return /* @__PURE__ */ jsxRuntime.jsx(
993
+ Tip,
994
+ {
995
+ tip: props.tip,
996
+ author: props.author ? {
997
+ ...props.author,
998
+ avatar: /* @__PURE__ */ jsxRuntime.jsx(
999
+ ExternalImage,
1000
+ {
1001
+ component: imageComponent,
1002
+ image: props.author.avatar,
1003
+ alt: props.author.name,
1004
+ style: { borderRadius: "50%" }
1005
+ }
1006
+ )
1007
+ } : null,
1008
+ mb: 4
1009
+ }
1010
+ );
1011
+ case "STRAPI__COMPONENT_CONTENT_CONTACTS_PAGE":
1012
+ return /* @__PURE__ */ jsxRuntime.jsx(Contacts, { ...props });
1013
+ case "STRAPI__COMPONENT_CONTENT_COOKIE_POLICY_PAGE":
1014
+ return /* @__PURE__ */ jsxRuntime.jsx(CookiePolicy, { ...props });
1015
+ case "STRAPI__COMPONENT_CONTENT_PRIVACY_POLICY_PAGE":
1016
+ return /* @__PURE__ */ jsxRuntime.jsx(PrivacyPolicy, { ...props });
1017
+ case "STRAPI__COMPONENT_CONTENT_TERMS_CONDITIONS_PAGE":
1018
+ return /* @__PURE__ */ jsxRuntime.jsx(TermsAndConditions, { ...props });
1019
+ default:
1020
+ return null;
1021
+ }
1022
+ };
1023
+ function isStrapiContent(array) {
1024
+ return Array.isArray(array) && array.every(
1025
+ (item) => typeof item === "object" && item !== null && "__typename" in item && typeof item.__typename === "string"
1026
+ );
1027
+ }
1028
+ const StrapiContentRenderer = ({ content, imageComponent }) => {
1029
+ if (!isStrapiContent(content)) {
1030
+ return null;
1031
+ }
1032
+ return content.map(({ __typename: type, ...props }, index2) => /* @__PURE__ */ jsxRuntime.jsx(StrapiComponent, { type, props, imageComponent }, index2));
1033
+ };
1034
+ exports.Author = Author;
1035
+ exports.AuthorCard = AuthorCard;
1036
+ exports.BonusCard = BonusCard;
1037
+ exports.BonusCardGrid = BonusCardGrid;
1038
+ exports.Center = Center;
1039
+ exports.Contacts = Contacts;
1040
+ exports.CookiePolicy = CookiePolicy;
1041
+ exports.Faq = Faq;
1042
+ exports.FeatureCard = FeatureCard;
1043
+ exports.FeatureCardGrid = FeatureCardGrid;
1044
+ exports.GameCard = GameCard;
1045
+ exports.GameCardGrid = GameCardGrid;
1046
+ exports.GameDemo = GameDemo;
1047
+ exports.GameInfo = GameInfo;
1048
+ exports.Grid = Grid;
1049
+ exports.HowTo = HowTo;
1050
+ exports.List = List;
1051
+ exports.NotFound = NotFound;
1052
+ exports.PrivacyPolicy = PrivacyPolicy;
1053
+ exports.ProsCons = ProsCons;
1054
+ exports.Seo = Seo;
1055
+ exports.StrapiContentRenderer = StrapiContentRenderer;
1056
+ exports.Table = Table;
1057
+ exports.Tabs = Tabs;
1058
+ exports.TermsAndConditions = TermsAndConditions;
1059
+ exports.Tip = Tip;