@anywayseo/tools 1.5.4 → 2.1.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 (61) hide show
  1. package/README.md +69 -62
  2. package/dist/components/base/center/index.d.ts +1 -3
  3. package/dist/components/{expert → base/expert}/bio/index.d.ts +1 -1
  4. package/dist/components/{expert → base/expert}/index.d.ts +1 -1
  5. package/dist/components/base/grid/index.d.ts +3 -11
  6. package/dist/components/base/index.d.ts +2 -0
  7. package/dist/components/base/link-button/index.d.ts +2 -2
  8. package/dist/components/base/pulse-button/index.d.ts +8 -0
  9. package/dist/components/bonus-card/index.d.ts +1 -3
  10. package/dist/components/contact-form/index.d.ts +3 -1
  11. package/dist/components/expert-tip/index.d.ts +2 -3
  12. package/dist/components/faq/index.d.ts +2 -4
  13. package/dist/components/feature-card/index.d.ts +5 -0
  14. package/dist/components/features/index.d.ts +2 -3
  15. package/dist/components/game-card/index.d.ts +1 -3
  16. package/dist/components/game-demo/index.d.ts +3 -4
  17. package/dist/components/game-demo/preview/index.d.ts +3 -3
  18. package/dist/components/how-to/index.d.ts +2 -3
  19. package/dist/components/index.cjs +4 -1
  20. package/dist/components/index.d.ts +1 -0
  21. package/dist/components/index.mjs +12 -9
  22. package/dist/components/layout/footer/navigation/index.d.ts +5 -1
  23. package/dist/components/layout/header/{navbar/navigation → navigation}/desktop/item/index.d.ts +1 -1
  24. package/dist/components/layout/header/{navbar/navigation → navigation}/mobile/item/index.d.ts +1 -1
  25. package/dist/components/layout/header/{navbar/navigation → navigation}/types.d.ts +1 -1
  26. package/dist/components/list/index.d.ts +1 -2
  27. package/dist/components/pros-cons/index.d.ts +2 -3
  28. package/dist/components/table/index.d.ts +0 -1
  29. package/dist/components/tabs/index.d.ts +1 -2
  30. package/dist/index-BNb-P8a6.mjs +17 -0
  31. package/dist/index-BhsXlbd8.js +16 -0
  32. package/dist/{index-jvxaXXE3.js → index-BrTxsE2A.js} +18 -0
  33. package/dist/{index-C95D6IAi.mjs → index-CHSIkTv7.mjs} +138 -140
  34. package/dist/index-CnohyDGd.js +965 -0
  35. package/dist/{index-CJvs4SfG.mjs → index-j8Vo42fz.mjs} +18 -0
  36. package/dist/index.cjs +9 -5
  37. package/dist/index.mjs +17 -13
  38. package/dist/providers/index.cjs +3 -3
  39. package/dist/providers/index.d.ts +1 -1
  40. package/dist/providers/index.mjs +3 -3
  41. package/dist/providers/site-provider/index.d.ts +11 -0
  42. package/dist/types/components/image/index.d.ts +2 -0
  43. package/dist/types/components/index.d.ts +1 -0
  44. package/dist/types/index.d.ts +1 -1
  45. package/dist/types/site/index.d.ts +32 -0
  46. package/dist/utils/animation/index.d.ts +8 -0
  47. package/dist/utils/index.cjs +2 -1
  48. package/dist/utils/index.d.ts +1 -0
  49. package/dist/utils/index.mjs +2 -1
  50. package/package.json +104 -105
  51. package/dist/components/layout/header/navbar/index.d.ts +0 -6
  52. package/dist/index-BbMf3hdf.js +0 -967
  53. package/dist/index-Bs4zA1wD.mjs +0 -17
  54. package/dist/index-D96zh94V.js +0 -16
  55. package/dist/providers/site-metadata-provider/index.d.ts +0 -14
  56. package/dist/types/site-metadata/index.d.ts +0 -10
  57. /package/dist/components/layout/header/{navbar/brand → brand}/index.d.ts +0 -0
  58. /package/dist/components/layout/header/{navbar/navigation → navigation}/desktop/index.d.ts +0 -0
  59. /package/dist/components/layout/header/{navbar/navigation → navigation}/index.d.ts +0 -0
  60. /package/dist/components/layout/header/{navbar/navigation → navigation}/mobile/index.d.ts +0 -0
  61. /package/dist/components/layout/header/{navbar/theme-toggler → theme-toggler}/index.d.ts +0 -0
@@ -0,0 +1,965 @@
1
+ "use strict";
2
+ const jsxRuntime = require("react/jsx-runtime");
3
+ const react = require("@chakra-ui/react");
4
+ const reactI18next = require("react-i18next");
5
+ const index$1 = require("./index-BrTxsE2A.js");
6
+ const i18n = require("./index-DCIXk-YH.js");
7
+ require("@ctrl/tinycolor");
8
+ require("@mdx-js/react");
9
+ const index = require("./index-BhsXlbd8.js");
10
+ const react$1 = require("react");
11
+ const icons = require("@chakra-ui/icons");
12
+ const index$2 = require("./index-IpSV-c71.js");
13
+ const i18n$1 = require("i18next");
14
+ const gatsby = require("gatsby");
15
+ const Center = ({ children, ...boxProps }) => {
16
+ return /* @__PURE__ */ jsxRuntime.jsx(react.Center, { ...boxProps, children });
17
+ };
18
+ const ONE_LINE_HEIGHT = 24;
19
+ const Bio = ({ content, maxLines = 1 }) => {
20
+ const ref = react$1.useRef(null);
21
+ const [showToggle, setShowToggle] = react$1.useState(false);
22
+ const [isExpanded, setIsExpanded] = react$1.useState(false);
23
+ const { t } = reactI18next.useTranslation("author");
24
+ react$1.useLayoutEffect(() => {
25
+ if (ref.current) {
26
+ const { scrollWidth, clientWidth, scrollHeight, clientHeight } = ref.current;
27
+ const isClamped = scrollWidth > clientWidth || scrollHeight > clientHeight;
28
+ setShowToggle(isClamped);
29
+ }
30
+ return () => {
31
+ setShowToggle(false);
32
+ };
33
+ }, []);
34
+ function handleClick() {
35
+ setIsExpanded((prev) => !prev);
36
+ }
37
+ return /* @__PURE__ */ jsxRuntime.jsxs(react.Box, { children: [
38
+ /* @__PURE__ */ jsxRuntime.jsx(react.Collapse, { in: isExpanded, startingHeight: ONE_LINE_HEIGHT * maxLines, children: /* @__PURE__ */ jsxRuntime.jsx(react.Text, { ref, fontSize: "md", noOfLines: isExpanded ? void 0 : maxLines, children: content }) }),
39
+ showToggle && /* @__PURE__ */ jsxRuntime.jsx(react.Button, { size: "sm", variant: "link", colorScheme: "blue", onClick: handleClick, children: isExpanded ? t("action.collapse") : t("action.expand") })
40
+ ] });
41
+ };
42
+ const Expert = ({ expert, variant }) => {
43
+ var _a;
44
+ const { firstName, lastName, jobTitle, bio } = expert;
45
+ const { assets } = index.useSiteContext();
46
+ const fullName = `${firstName} ${lastName}`;
47
+ const image = (_a = assets == null ? void 0 : assets.images) == null ? void 0 : _a.expert;
48
+ const imageComponent = typeof image === "string" ? /* @__PURE__ */ jsxRuntime.jsx(react.Image, { src: image, alt: fullName, rounded: "full" }) : image;
49
+ if (variant === "short") {
50
+ return /* @__PURE__ */ jsxRuntime.jsxs(react.Flex, { as: "article", align: "center", gap: 4, children: [
51
+ !!imageComponent && /* @__PURE__ */ jsxRuntime.jsx(react.Box, { w: 12, h: 12, children: imageComponent }),
52
+ /* @__PURE__ */ jsxRuntime.jsxs(react.Box, { fontWeight: "semibold", children: [
53
+ /* @__PURE__ */ jsxRuntime.jsx(react.Text, { children: fullName }),
54
+ /* @__PURE__ */ jsxRuntime.jsx(react.Text, { color: "gray.500", children: expert.jobTitle })
55
+ ] })
56
+ ] });
57
+ }
58
+ return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
59
+ !!imageComponent && /* @__PURE__ */ jsxRuntime.jsx(react.Flex, { grow: 1, maxW: { base: 48, sm: 32 }, children: imageComponent }),
60
+ /* @__PURE__ */ jsxRuntime.jsx(react.Flex, { w: "100%", children: /* @__PURE__ */ jsxRuntime.jsxs(react.Stack, { children: [
61
+ /* @__PURE__ */ jsxRuntime.jsxs(react.Text, { fontSize: "lg", fontWeight: 600, children: [
62
+ `${fullName}, `,
63
+ /* @__PURE__ */ jsxRuntime.jsx(react.Text, { as: "span", color: "gray.500", children: jobTitle })
64
+ ] }),
65
+ /* @__PURE__ */ jsxRuntime.jsx(Bio, { content: bio })
66
+ ] }) })
67
+ ] });
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.SimpleGrid, { as: "ul", columns, spacing: gap, p: 0, m: 0, listStyleType: "none", ...boxProps, children: items.map((item, index2) => /* @__PURE__ */ jsxRuntime.jsx(react.Box, { as: "li", children: render(item) }, getKey ? getKey(item) : index2)) });
72
+ };
73
+ const LinkButton = ({ label, url, width = "auto", ...boxProps }) => {
74
+ return /* @__PURE__ */ jsxRuntime.jsx(
75
+ react.Button,
76
+ {
77
+ as: react.Link,
78
+ href: url,
79
+ w: width,
80
+ bg: "brand.600",
81
+ textTransform: "uppercase",
82
+ _hover: { textDecoration: "none", bg: "brand.300" },
83
+ _active: { transform: "scale(0.95)" },
84
+ ...boxProps,
85
+ children: label
86
+ }
87
+ );
88
+ };
89
+ const PulseButton = ({ label, onClick }) => {
90
+ return /* @__PURE__ */ jsxRuntime.jsx(
91
+ react.Button,
92
+ {
93
+ size: { base: "sm", md: "lg" },
94
+ color: "gray.200",
95
+ bgColor: "brand.500",
96
+ animation: `${index$1.Animation.pulse} 2s infinite linear`,
97
+ _hover: { bgColor: "brand.200", color: "gray.700" },
98
+ onClick,
99
+ children: label
100
+ }
101
+ );
102
+ };
103
+ const Author = ({ author, ...cardProps }) => {
104
+ const { t } = reactI18next.useTranslation("author");
105
+ return /* @__PURE__ */ jsxRuntime.jsxs(react.Card, { as: "article", variant: "filled", ...cardProps, children: [
106
+ /* @__PURE__ */ jsxRuntime.jsx(react.CardHeader, { pb: 0, children: /* @__PURE__ */ jsxRuntime.jsx(react.Heading, { size: "md", children: t("title") }) }),
107
+ /* @__PURE__ */ jsxRuntime.jsx(
108
+ react.CardBody,
109
+ {
110
+ display: "flex",
111
+ flexDirection: { base: "column", sm: "row" },
112
+ alignItems: { base: "center", sm: "flex-start" },
113
+ gap: 4,
114
+ children: /* @__PURE__ */ jsxRuntime.jsx(Expert, { expert: author, variant: "full" })
115
+ }
116
+ )
117
+ ] });
118
+ };
119
+ const BonusCardContent = ({ content }) => {
120
+ const { t } = reactI18next.useTranslation("author");
121
+ return /* @__PURE__ */ jsxRuntime.jsx(react.Popover, { flip: false, matchWidth: false, placement: "bottom", children: ({ isOpen }) => /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
122
+ /* @__PURE__ */ jsxRuntime.jsx(react.PopoverTrigger, { children: /* @__PURE__ */ jsxRuntime.jsx(react.Button, { size: "sm", variant: "link", color: "white", children: isOpen ? t("action.collapse") : t("action.expand") }) }),
123
+ /* @__PURE__ */ jsxRuntime.jsx(react.PopoverContent, { w: 60, children: /* @__PURE__ */ jsxRuntime.jsx(react.PopoverBody, { children: Array.isArray(content) ? /* @__PURE__ */ jsxRuntime.jsx(react.Stack, { children: content.map((paragraph, index2) => /* @__PURE__ */ jsxRuntime.jsx(react.Text, { as: "span", children: paragraph }, index2)) }) : /* @__PURE__ */ jsxRuntime.jsx(react.Text, { children: content }) }) })
124
+ ] }) });
125
+ };
126
+ const BonusCardTitle = ({ content }) => {
127
+ return /* @__PURE__ */ jsxRuntime.jsx(
128
+ react.Text,
129
+ {
130
+ as: "h3",
131
+ display: "inline-block",
132
+ py: 1,
133
+ px: 2,
134
+ borderRadius: "md",
135
+ bg: "yellow",
136
+ color: "black",
137
+ fontWeight: "bold",
138
+ fontSize: "lg",
139
+ children: content
140
+ }
141
+ );
142
+ };
143
+ const BonusCard = ({ title, subtitle, content, link, image }) => {
144
+ return /* @__PURE__ */ jsxRuntime.jsxs(
145
+ react.Card,
146
+ {
147
+ as: "article",
148
+ h: "full",
149
+ bg: "linear-gradient(90deg, #3b1f47, #731d58)",
150
+ _before: image ? {
151
+ content: '""',
152
+ position: "absolute",
153
+ top: 0,
154
+ left: 0,
155
+ w: "100%",
156
+ h: "100%",
157
+ bgImage: `url(${image})`,
158
+ bgSize: "cover",
159
+ bgPosition: "center",
160
+ filter: "blur(0.05em) opacity(50%)",
161
+ zIndex: 0
162
+ } : void 0,
163
+ children: [
164
+ /* @__PURE__ */ jsxRuntime.jsxs(react.CardBody, { as: "section", pb: 0, flex: 1, children: [
165
+ /* @__PURE__ */ jsxRuntime.jsx(BonusCardTitle, { content: title }),
166
+ /* @__PURE__ */ jsxRuntime.jsx(react.Text, { fontSize: "2xl", fontWeight: "bold", my: 2, children: subtitle }),
167
+ /* @__PURE__ */ jsxRuntime.jsx(BonusCardContent, { content })
168
+ ] }),
169
+ /* @__PURE__ */ jsxRuntime.jsx(react.CardFooter, { as: "footer", p: 4, children: /* @__PURE__ */ jsxRuntime.jsx(LinkButton, { ...link, width: "full" }) })
170
+ ]
171
+ }
172
+ );
173
+ };
174
+ const ContactForm = ({ ...boxProps }) => {
175
+ const toast = react.useToast();
176
+ const { t } = reactI18next.useTranslation("contactForm");
177
+ function handleSubmit(event) {
178
+ event.preventDefault();
179
+ const form = event.currentTarget;
180
+ const formData = new FormData(form);
181
+ const name = formData.get("name");
182
+ const email = formData.get("email");
183
+ const message = formData.get("message");
184
+ if (name && email && message) {
185
+ form.reset();
186
+ toast({
187
+ title: t("notification.title", { name }),
188
+ description: t("notification.description", { email }),
189
+ colorScheme: "brand",
190
+ status: "success",
191
+ duration: 5e3,
192
+ isClosable: true
193
+ });
194
+ } else {
195
+ console.error("Please fill out both fields");
196
+ }
197
+ }
198
+ return /* @__PURE__ */ jsxRuntime.jsx(
199
+ react.Box,
200
+ {
201
+ as: "form",
202
+ borderRadius: "lg",
203
+ p: 8,
204
+ color: react.useColorModeValue("gray.700", "whiteAlpha.900"),
205
+ bg: react.useColorModeValue("white", "gray.700"),
206
+ shadow: "base",
207
+ onSubmit: handleSubmit,
208
+ ...boxProps,
209
+ children: /* @__PURE__ */ jsxRuntime.jsxs(react.VStack, { spacing: 4, children: [
210
+ /* @__PURE__ */ jsxRuntime.jsxs(react.FormControl, { isRequired: true, children: [
211
+ /* @__PURE__ */ jsxRuntime.jsx(react.FormLabel, { children: t("field.name.label") }),
212
+ /* @__PURE__ */ jsxRuntime.jsxs(react.InputGroup, { children: [
213
+ /* @__PURE__ */ jsxRuntime.jsx(react.InputLeftElement, { children: /* @__PURE__ */ jsxRuntime.jsx(
214
+ "svg",
215
+ {
216
+ xmlns: "http://www.w3.org/2000/svg",
217
+ width: "16",
218
+ height: "16",
219
+ fill: "currentColor",
220
+ className: "bi bi-person-fill",
221
+ viewBox: "0 0 16 16",
222
+ 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" })
223
+ }
224
+ ) }),
225
+ /* @__PURE__ */ jsxRuntime.jsx(react.Input, { type: "text", name: "name", placeholder: t("field.name.placeholder") })
226
+ ] })
227
+ ] }),
228
+ /* @__PURE__ */ jsxRuntime.jsxs(react.FormControl, { isRequired: true, children: [
229
+ /* @__PURE__ */ jsxRuntime.jsx(react.FormLabel, { children: t("field.email.label") }),
230
+ /* @__PURE__ */ jsxRuntime.jsxs(react.InputGroup, { children: [
231
+ /* @__PURE__ */ jsxRuntime.jsx(react.InputLeftElement, { children: /* @__PURE__ */ jsxRuntime.jsx(icons.EmailIcon, {}) }),
232
+ /* @__PURE__ */ jsxRuntime.jsx(react.Input, { type: "email", name: "email", placeholder: t("field.email.placeholder") })
233
+ ] })
234
+ ] }),
235
+ /* @__PURE__ */ jsxRuntime.jsxs(react.FormControl, { isRequired: true, children: [
236
+ /* @__PURE__ */ jsxRuntime.jsx(react.FormLabel, { children: t("field.message.label") }),
237
+ /* @__PURE__ */ jsxRuntime.jsx(react.Textarea, { name: "message", placeholder: t("field.message.placeholder"), rows: 6, resize: "none" })
238
+ ] }),
239
+ /* @__PURE__ */ jsxRuntime.jsx(react.Button, { type: "submit", colorScheme: "brand", width: "full", children: t("action.send") })
240
+ ] })
241
+ }
242
+ );
243
+ };
244
+ const ExpertTip = ({ tip, expert, ...boxProps }) => {
245
+ return /* @__PURE__ */ jsxRuntime.jsxs(
246
+ react.Card,
247
+ {
248
+ variant: "filled",
249
+ p: 4,
250
+ borderLeft: "4px solid gray",
251
+ gap: 4,
252
+ _before: {
253
+ content: '"❛❛"',
254
+ position: "absolute",
255
+ top: -8,
256
+ left: -2,
257
+ fontSize: "6rem",
258
+ fontStyle: "italic",
259
+ color: react.useColorModeValue("blackAlpha.300", "whiteAlpha.300")
260
+ },
261
+ ...boxProps,
262
+ children: [
263
+ /* @__PURE__ */ jsxRuntime.jsx(react.CardBody, { as: "blockquote", p: 0, fontStyle: "italic", children: tip }),
264
+ !!expert && /* @__PURE__ */ jsxRuntime.jsx(react.CardFooter, { alignItems: "center", justify: "flex-end", p: 0, children: /* @__PURE__ */ jsxRuntime.jsx(Expert, { expert, variant: "short" }) })
265
+ ]
266
+ }
267
+ );
268
+ };
269
+ const Faq = ({ items, ...boxProps }) => {
270
+ const { bgColor, color } = index$2.usePrimaryColors();
271
+ return /* @__PURE__ */ jsxRuntime.jsx(react.Accordion, { allowToggle: true, ...boxProps, children: items.map(({ question, answer }) => {
272
+ return /* @__PURE__ */ jsxRuntime.jsxs(react.AccordionItem, { border: 0, children: [
273
+ /* @__PURE__ */ jsxRuntime.jsx(react.Box, { as: "h3", children: /* @__PURE__ */ jsxRuntime.jsxs(react.AccordionButton, { _hover: { color, bgColor }, children: [
274
+ /* @__PURE__ */ jsxRuntime.jsx(react.Box, { as: "span", flex: "1", textAlign: "left", fontWeight: "bold", children: question }),
275
+ /* @__PURE__ */ jsxRuntime.jsx(react.AccordionIcon, {})
276
+ ] }) }),
277
+ /* @__PURE__ */ jsxRuntime.jsx(react.AccordionPanel, { children: answer })
278
+ ] }, question);
279
+ }) });
280
+ };
281
+ const FeatureCard = ({ title, description }) => {
282
+ return /* @__PURE__ */ jsxRuntime.jsxs(react.Card, { as: "article", variant: "outline", textAlign: "center", h: "100%", children: [
283
+ /* @__PURE__ */ jsxRuntime.jsxs(react.CardHeader, { as: "header", display: "flex", alignItems: "center", justifyContent: "center", gap: 2, pb: 2, children: [
284
+ /* @__PURE__ */ jsxRuntime.jsx(icons.StarIcon, { w: 8, h: 8, color: "yellow.400" }),
285
+ /* @__PURE__ */ jsxRuntime.jsx(react.Text, { fontWeight: 600, children: title }),
286
+ /* @__PURE__ */ jsxRuntime.jsx(icons.StarIcon, { w: 8, h: 8, color: "yellow.400" })
287
+ ] }),
288
+ /* @__PURE__ */ jsxRuntime.jsx(react.CardBody, { as: "section", pt: 0, children: /* @__PURE__ */ jsxRuntime.jsx(react.Text, { color: "gray.200", children: description }) })
289
+ ] });
290
+ };
291
+ const Features = ({ features, ...boxProps }) => {
292
+ return /* @__PURE__ */ jsxRuntime.jsx(
293
+ Grid,
294
+ {
295
+ items: features,
296
+ columns: { base: 1, md: 2, lg: 3 },
297
+ gap: 10,
298
+ getKey: ({ title }) => title,
299
+ render: (item) => /* @__PURE__ */ jsxRuntime.jsx(FeatureCard, { ...item }),
300
+ ...boxProps
301
+ }
302
+ );
303
+ };
304
+ const GameCard = ({ name, image, link }) => {
305
+ return /* @__PURE__ */ jsxRuntime.jsxs(
306
+ react.LinkBox,
307
+ {
308
+ as: "article",
309
+ rounded: "md",
310
+ borderWidth: 1,
311
+ transition: "transform 0.2s ease",
312
+ cursor: link ? "pointer" : "default",
313
+ overflow: "hidden",
314
+ bg: "blackAlpha.400",
315
+ _hover: { transform: "scale(1.1)" },
316
+ children: [
317
+ typeof image === "string" ? /* @__PURE__ */ jsxRuntime.jsx(react.Image, { src: image, alt: name, w: "100%", aspectRatio: "16/9", objectFit: "cover", objectPosition: "center" }) : !!image && /* @__PURE__ */ jsxRuntime.jsx(react.Box, { w: "100%", aspectRatio: "16/9", children: image }),
318
+ /* @__PURE__ */ jsxRuntime.jsx(react.Box, { as: "section", rounded: "md", p: 4, children: /* @__PURE__ */ jsxRuntime.jsx(react.Text, { as: "span", children: link ? /* @__PURE__ */ jsxRuntime.jsx(react.LinkOverlay, { href: link, children: name }) : name }) })
319
+ ]
320
+ }
321
+ );
322
+ };
323
+ const GameDemoContent = ({ src, isFullscreen, isLoaded, onLoad, onToggleFullscreen }) => {
324
+ const { t } = reactI18next.useTranslation("gameDemo");
325
+ return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
326
+ /* @__PURE__ */ jsxRuntime.jsx(
327
+ react.Box,
328
+ {
329
+ as: "iframe",
330
+ src,
331
+ sandbox: "allow-scripts allow-same-origin",
332
+ loading: "lazy",
333
+ w: "100%",
334
+ h: "100%",
335
+ allowFullScreen: true,
336
+ onLoad,
337
+ children: /* @__PURE__ */ jsxRuntime.jsx("p", { children: t("warning") })
338
+ }
339
+ ),
340
+ /* @__PURE__ */ jsxRuntime.jsx(
341
+ react.IconButton,
342
+ {
343
+ icon: isFullscreen ? /* @__PURE__ */ jsxRuntime.jsx(icons.CloseIcon, { w: 3, h: 3 }) : /* @__PURE__ */ jsxRuntime.jsx(icons.ExternalLinkIcon, { w: 4, h: 4 }),
344
+ size: "sm",
345
+ variant: "outline",
346
+ title: t(isFullscreen ? "action.deactivateFullscreen" : "action.activateFullscreen"),
347
+ "aria-label": "Fullscreen mode Toggle",
348
+ isRound: true,
349
+ disabled: !isLoaded,
350
+ position: "absolute",
351
+ top: 2,
352
+ left: 2,
353
+ border: "none",
354
+ color: "white",
355
+ _hover: { bgColor: "whiteAlpha.400" },
356
+ onClick: onToggleFullscreen
357
+ }
358
+ ),
359
+ /* @__PURE__ */ jsxRuntime.jsx(react.AbsoluteCenter, { children: /* @__PURE__ */ jsxRuntime.jsx(react.Spinner, { size: "xl", thickness: "0.6rem", display: isLoaded ? "none" : "block", color: "brand.100" }) })
360
+ ] });
361
+ };
362
+ const GameDemoPreview = ({ alt, imageFit = "contain", onPlay }) => {
363
+ var _a;
364
+ const { assets } = index.useSiteContext();
365
+ const { t } = reactI18next.useTranslation("gameDemo");
366
+ const gamePreviewImage = (_a = assets == null ? void 0 : assets.images) == null ? void 0 : _a.gamePreview;
367
+ const gamePreviewImageComponent = typeof gamePreviewImage === "string" ? /* @__PURE__ */ jsxRuntime.jsx(react.Image, { src: gamePreviewImage, alt, objectFit: imageFit }) : gamePreviewImage;
368
+ return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
369
+ gamePreviewImageComponent,
370
+ /* @__PURE__ */ jsxRuntime.jsx(react.AbsoluteCenter, { children: /* @__PURE__ */ jsxRuntime.jsx(PulseButton, { label: t("action.playForFree"), onClick: onPlay }) })
371
+ ] });
372
+ };
373
+ const GameDemo = ({ name, src, previewImageFit, ...boxProps }) => {
374
+ const [isRunning, setIsRunning] = react$1.useState(false);
375
+ const [isLoaded, setIsLoaded] = react$1.useState(false);
376
+ const { isOpen: isFullscreen, onToggle } = react.useDisclosure({ defaultIsOpen: false });
377
+ function handlePlay() {
378
+ setIsRunning(true);
379
+ }
380
+ function onLoad() {
381
+ setIsLoaded(true);
382
+ }
383
+ function handleToggleFullscreen() {
384
+ document.body.style.overflowY = isFullscreen ? "auto" : "hidden";
385
+ onToggle();
386
+ }
387
+ return /* @__PURE__ */ jsxRuntime.jsx(
388
+ react.Box,
389
+ {
390
+ as: "article",
391
+ display: "grid",
392
+ w: "100%",
393
+ aspectRatio: "16/9 auto",
394
+ ...isFullscreen ? { zIndex: 100, inset: 0, position: "fixed", h: "100dvh" } : { position: "relative" },
395
+ ...boxProps,
396
+ children: isRunning ? /* @__PURE__ */ jsxRuntime.jsx(
397
+ GameDemoContent,
398
+ {
399
+ src,
400
+ isFullscreen,
401
+ isLoaded,
402
+ onLoad,
403
+ onToggleFullscreen: handleToggleFullscreen
404
+ }
405
+ ) : /* @__PURE__ */ jsxRuntime.jsx(GameDemoPreview, { alt: name, imageFit: previewImageFit, onPlay: handlePlay })
406
+ }
407
+ );
408
+ };
409
+ const GameInfoItem = ({ title, value }) => {
410
+ return /* @__PURE__ */ jsxRuntime.jsxs(react.Flex, { gap: 2, children: [
411
+ /* @__PURE__ */ jsxRuntime.jsxs(react.Text, { w: "50%", color: "gray.500", textTransform: "capitalize", children: [
412
+ title,
413
+ ":"
414
+ ] }),
415
+ /* @__PURE__ */ jsxRuntime.jsx(react.Text, { w: "50%", textTransform: "capitalize", children: value })
416
+ ] });
417
+ };
418
+ const VISIBLE_LANGUAGE_NUMBER = 5;
419
+ function stringifyHasFeature(value) {
420
+ return i18n$1.t(`gameInfo:value.boolean.${value}`);
421
+ }
422
+ function stringifyVolatility(value) {
423
+ return i18n$1.t(`gameInfo:value.volatility.${value}`);
424
+ }
425
+ function stringifyArray(array) {
426
+ return array.join(", ");
427
+ }
428
+ function stringifyLanguageArray(languages) {
429
+ return languages.length > VISIBLE_LANGUAGE_NUMBER ? `${stringifyArray(languages.slice(0, VISIBLE_LANGUAGE_NUMBER))}, +${languages.length - VISIBLE_LANGUAGE_NUMBER}` : stringifyArray(languages);
430
+ }
431
+ function getGameInfoItemValue(key, value, currency) {
432
+ let formattedValue = "";
433
+ if (key === i18n.GameCharacteristic.Rtp) {
434
+ formattedValue = index$1.formatNumber(value, { percent: "real", precision: 3 });
435
+ }
436
+ if ((key === i18n.GameCharacteristic.MinBet || key === i18n.GameCharacteristic.MaxBet || key === i18n.GameCharacteristic.MaxWin) && typeof value === "number") {
437
+ if (Array.isArray(currency)) {
438
+ const [primary, ...secondaries] = currency || ["USD"];
439
+ const primaryValue = index$1.formatNumber(value, { currency: primary });
440
+ formattedValue = secondaries.length ? `${primaryValue} (${secondaries.map((currency2) => index$1.getCurrencySymbol(currency2)).join(", ")})` : primaryValue;
441
+ } else {
442
+ formattedValue = index$1.formatNumber(value, { currency });
443
+ }
444
+ }
445
+ if (key === i18n.GameCharacteristic.Compatibility || key === i18n.GameCharacteristic.BonusFeatures && typeof value !== "string") {
446
+ formattedValue = stringifyArray(value);
447
+ }
448
+ if (key === i18n.GameCharacteristic.Languages) {
449
+ formattedValue = stringifyLanguageArray(value);
450
+ }
451
+ if (key === i18n.GameCharacteristic.ReleaseDate) {
452
+ formattedValue = index$1.formatDate({ value, options: { year: "numeric", month: "long" } });
453
+ }
454
+ if (key === i18n.GameCharacteristic.Volatility) {
455
+ formattedValue = stringifyVolatility(value);
456
+ }
457
+ if (typeof value === "boolean") {
458
+ formattedValue = stringifyHasFeature(value);
459
+ }
460
+ if (!formattedValue) {
461
+ formattedValue = value.toLocaleString();
462
+ }
463
+ return formattedValue;
464
+ }
465
+ const GameInfo = ({ info }) => {
466
+ const { metadata } = index.useSiteContext();
467
+ const { currency } = metadata;
468
+ const { t } = reactI18next.useTranslation("gameInfo");
469
+ return /* @__PURE__ */ jsxRuntime.jsx(
470
+ react.Box,
471
+ {
472
+ as: "aside",
473
+ float: { base: "none", lg: "right" },
474
+ w: { base: "100%", lg: "xs" },
475
+ ml: { base: 0, lg: 4 },
476
+ mb: { base: 0, lg: 4 },
477
+ children: /* @__PURE__ */ jsxRuntime.jsxs(react.Card, { as: "article", variant: "outline", h: "100%", p: 2, children: [
478
+ /* @__PURE__ */ jsxRuntime.jsx(react.CardHeader, { as: "header", p: 0, children: /* @__PURE__ */ jsxRuntime.jsx(react.Heading, { as: "h2", fontSize: "xl", children: t("title") }) }),
479
+ /* @__PURE__ */ jsxRuntime.jsx(react.CardBody, { as: "section", p: 0, children: Object.entries(info).map(([group, items]) => /* @__PURE__ */ jsxRuntime.jsxs(react$1.Fragment, { children: [
480
+ /* @__PURE__ */ jsxRuntime.jsx(react.Divider, { my: 2 }),
481
+ /* @__PURE__ */ jsxRuntime.jsx(react.Text, { fontWeight: "semibold", mb: 2, children: t(`group.${group}`) }),
482
+ Object.entries(items).map(([itemKey, itemValue]) => {
483
+ const feature = itemKey;
484
+ const value = getGameInfoItemValue(feature, itemValue, currency);
485
+ return /* @__PURE__ */ jsxRuntime.jsx(GameInfoItem, { title: t(`feature.${feature}`), value }, itemKey);
486
+ })
487
+ ] }, group)) })
488
+ ] })
489
+ }
490
+ );
491
+ };
492
+ const HowTo = ({ steps, ...boxProps }) => {
493
+ const { color, bgColor } = index$2.usePrimaryColors();
494
+ return /* @__PURE__ */ jsxRuntime.jsx(react.SimpleGrid, { as: "ol", columns: { base: 1, md: 2, lg: 3 }, gap: 4, p: 0, ...boxProps, children: steps.map(({ title, description }, index2) => /* @__PURE__ */ jsxRuntime.jsxs(react.Flex, { as: "li", alignItems: "flex-start", gap: 4, children: [
495
+ /* @__PURE__ */ jsxRuntime.jsx(react.Circle, { size: 12, bgColor, color, fontSize: "lg", fontWeight: "bold", children: String(index2 + 1) }),
496
+ /* @__PURE__ */ jsxRuntime.jsxs(react.Stack, { flex: 1, children: [
497
+ /* @__PURE__ */ jsxRuntime.jsx(react.Text, { fontSize: "lg", fontWeight: "bold", children: title }),
498
+ /* @__PURE__ */ jsxRuntime.jsx(react.Text, { children: description })
499
+ ] })
500
+ ] }, index2)) });
501
+ };
502
+ const Container = ({ children }) => {
503
+ return /* @__PURE__ */ jsxRuntime.jsx(react.Container, { maxW: "container.xl", children });
504
+ };
505
+ const Content = ({ children }) => {
506
+ return /* @__PURE__ */ jsxRuntime.jsx(react.Box, { as: "section", py: 4, children: /* @__PURE__ */ jsxRuntime.jsx(Container, { children }) });
507
+ };
508
+ const Logo = () => {
509
+ var _a;
510
+ const { assets } = index.useSiteContext();
511
+ const image = (_a = assets == null ? void 0 : assets.images) == null ? void 0 : _a.logo;
512
+ if (!image) {
513
+ return null;
514
+ }
515
+ return /* @__PURE__ */ jsxRuntime.jsx(react.Box, { display: "flex", h: { base: 10, md: 14 }, overflow: "hidden", children: typeof image === "string" ? /* @__PURE__ */ jsxRuntime.jsx(react.Image, { src: image, alt: "Logo", objectFit: "contain" }) : image });
516
+ };
517
+ const Brand$1 = ({ brand }) => {
518
+ return /* @__PURE__ */ jsxRuntime.jsxs(react.Box, { position: "relative", my: 2, py: 8, children: [
519
+ /* @__PURE__ */ jsxRuntime.jsx(react.Divider, {}),
520
+ /* @__PURE__ */ jsxRuntime.jsx(react.AbsoluteCenter, { display: "flex", bgColor: react.useColorModeValue("gray.50", "gray.900"), children: /* @__PURE__ */ jsxRuntime.jsx(gatsby.Link, { to: "/", children: brand }) })
521
+ ] });
522
+ };
523
+ const Copyright = () => {
524
+ const { metadata } = index.useSiteContext();
525
+ const { siteUrl } = metadata;
526
+ const { t } = reactI18next.useTranslation("footer");
527
+ return /* @__PURE__ */ jsxRuntime.jsx(react.Text, { as: "small", colorScheme: "gray", display: "flex", align: "center", justifyContent: "center", children: t("copyright", { year: index$1.getCurrentYear(), domain: index$1.getDomain(siteUrl) }) });
528
+ };
529
+ const Disclaimer = () => {
530
+ const { metadata } = index.useSiteContext();
531
+ const { siteUrl } = metadata;
532
+ const { t } = reactI18next.useTranslation("footer");
533
+ return /* @__PURE__ */ jsxRuntime.jsxs(react.Text, { as: "small", colorScheme: "gray", fontSize: "sm", children: [
534
+ /* @__PURE__ */ jsxRuntime.jsx(react.Text, { as: "span", fontWeight: "bold", color: "red.600", children: t("disclaimer.title") }),
535
+ t("disclaimer.description", { domain: index$1.getDomain(siteUrl) })
536
+ ] });
537
+ };
538
+ const Navigation$1 = ({ menu }) => {
539
+ return /* @__PURE__ */ jsxRuntime.jsx(
540
+ react.SimpleGrid,
541
+ {
542
+ columns: { base: 1, sm: 2, md: 4 },
543
+ pt: 4,
544
+ pb: 6,
545
+ spacing: 4,
546
+ justifyItems: { base: "flex-start", md: "center" },
547
+ justifyContent: "space-between",
548
+ children: menu.map(({ url, title }) => /* @__PURE__ */ jsxRuntime.jsx(
549
+ react.Text,
550
+ {
551
+ as: gatsby.Link,
552
+ to: url,
553
+ fontSize: "md",
554
+ fontWeight: "semibold",
555
+ colorScheme: "gray",
556
+ _hover: { textDecoration: "none", color: "brand.400" },
557
+ children: title
558
+ },
559
+ url
560
+ ))
561
+ }
562
+ );
563
+ };
564
+ const Footer = () => {
565
+ var _a;
566
+ const { configs } = index.useSiteContext();
567
+ const navigation = ((_a = configs == null ? void 0 : configs.footer) == null ? void 0 : _a.navigation) ?? [];
568
+ return /* @__PURE__ */ jsxRuntime.jsx(
569
+ react.Box,
570
+ {
571
+ as: "footer",
572
+ bg: react.useColorModeValue("gray.50", "gray.900"),
573
+ color: react.useColorModeValue("gray.700", "gray.200"),
574
+ py: 4,
575
+ children: /* @__PURE__ */ jsxRuntime.jsxs(Container, { children: [
576
+ /* @__PURE__ */ jsxRuntime.jsx(Navigation$1, { menu: navigation }),
577
+ /* @__PURE__ */ jsxRuntime.jsx(Disclaimer, {}),
578
+ /* @__PURE__ */ jsxRuntime.jsx(Brand$1, { brand: /* @__PURE__ */ jsxRuntime.jsx(Logo, {}) }),
579
+ /* @__PURE__ */ jsxRuntime.jsx(Copyright, {})
580
+ ] })
581
+ }
582
+ );
583
+ };
584
+ const Brand = ({ brand }) => {
585
+ return /* @__PURE__ */ jsxRuntime.jsx(gatsby.Link, { to: "/", children: brand });
586
+ };
587
+ const DesktopNavItem = ({ title, url, children }) => {
588
+ const background = react.useColorModeValue("white", "gray.800");
589
+ const backgroundHover = react.useColorModeValue("brand.50", "gray.900");
590
+ return /* @__PURE__ */ jsxRuntime.jsxs(react.Popover, { trigger: "hover", placement: "bottom-start", children: [
591
+ /* @__PURE__ */ jsxRuntime.jsx(react.PopoverTrigger, { children: /* @__PURE__ */ jsxRuntime.jsx(
592
+ react.Text,
593
+ {
594
+ as: gatsby.Link,
595
+ to: url,
596
+ p: 2,
597
+ fontSize: "sm",
598
+ fontWeight: 500,
599
+ _hover: { textDecoration: "none", color: "brand.400" },
600
+ children: title
601
+ }
602
+ ) }),
603
+ !!children && /* @__PURE__ */ jsxRuntime.jsx(react.PopoverContent, { p: 2, border: 0, minW: "sm", rounded: "xl", boxShadow: "xl", bg: background, children: /* @__PURE__ */ jsxRuntime.jsx(react.Stack, { as: "ul", p: 0, children: children.map((child) => /* @__PURE__ */ jsxRuntime.jsx(
604
+ react.Box,
605
+ {
606
+ as: "li",
607
+ role: "group",
608
+ display: "block",
609
+ p: 2,
610
+ cursor: "pointer",
611
+ rounded: "md",
612
+ _hover: { bg: backgroundHover },
613
+ children: /* @__PURE__ */ jsxRuntime.jsxs(react.Stack, { direction: "row", children: [
614
+ /* @__PURE__ */ jsxRuntime.jsxs(react.Box, { children: [
615
+ /* @__PURE__ */ jsxRuntime.jsx(react.Text, { fontWeight: 500, transition: "all .3s ease", _groupHover: { color: "brand.400" }, children: child.title }),
616
+ !!child.subtitle && /* @__PURE__ */ jsxRuntime.jsx(react.Text, { fontSize: "sm", children: child.subtitle })
617
+ ] }),
618
+ /* @__PURE__ */ jsxRuntime.jsx(
619
+ react.Flex,
620
+ {
621
+ flex: 1,
622
+ justify: "flex-end",
623
+ align: "center",
624
+ opacity: 0,
625
+ transition: "all .3s ease",
626
+ transform: "translateX(-10px)",
627
+ _groupHover: { opacity: 1, transform: "translateX(0)" },
628
+ children: /* @__PURE__ */ jsxRuntime.jsx(react.Icon, { as: icons.ChevronRightIcon, color: "brand.400", w: 5, h: 5 })
629
+ }
630
+ )
631
+ ] })
632
+ },
633
+ child.url
634
+ )) }) })
635
+ ] });
636
+ };
637
+ const DesktopNavigation = ({ menu }) => {
638
+ return /* @__PURE__ */ jsxRuntime.jsx(react.Flex, { as: "ul", direction: "row", gap: 4, p: 0, children: menu.map((item) => /* @__PURE__ */ jsxRuntime.jsx(react.Flex, { as: "li", children: /* @__PURE__ */ jsxRuntime.jsx(DesktopNavItem, { ...item }) }, item.url)) });
639
+ };
640
+ const MobileNavItem = ({ title, children, url }) => {
641
+ const { isOpen, onToggle } = react.useDisclosure();
642
+ return /* @__PURE__ */ jsxRuntime.jsxs(react.Stack, { w: "100%", p: 2, children: [
643
+ /* @__PURE__ */ jsxRuntime.jsxs(react.Flex, { align: "center", gap: 2, justify: "space-between", children: [
644
+ /* @__PURE__ */ jsxRuntime.jsx(react.Text, { as: gatsby.Link, to: url, isTruncated: true, fontWeight: 600, children: title }),
645
+ !!children && /* @__PURE__ */ jsxRuntime.jsx(react.Flex, { as: "button", onClick: onToggle, children: /* @__PURE__ */ jsxRuntime.jsx(
646
+ react.Icon,
647
+ {
648
+ as: icons.ChevronDownIcon,
649
+ w: 6,
650
+ h: 6,
651
+ transform: isOpen ? "rotate(180deg)" : "",
652
+ transition: "all .25s ease-in-out"
653
+ }
654
+ ) })
655
+ ] }),
656
+ /* @__PURE__ */ jsxRuntime.jsx(react.Collapse, { in: isOpen, animateOpacity: true, children: /* @__PURE__ */ jsxRuntime.jsx(
657
+ react.Stack,
658
+ {
659
+ as: "ul",
660
+ pl: 2,
661
+ borderLeft: 1,
662
+ borderStyle: "solid",
663
+ borderColor: react.useColorModeValue("gray.200", "gray.700"),
664
+ children: !!children && children.map((child) => /* @__PURE__ */ jsxRuntime.jsx(react.Flex, { as: "li", children: /* @__PURE__ */ jsxRuntime.jsx(react.Text, { as: gatsby.Link, to: `${url}${child.url}`, py: 2, children: child.title }) }, child.url))
665
+ }
666
+ ) })
667
+ ] });
668
+ };
669
+ const MobileNavigation = ({ menu }) => {
670
+ const { isOpen, onToggle } = react.useDisclosure();
671
+ const background = react.useColorModeValue("white", "gray.800");
672
+ return menu.length ? /* @__PURE__ */ jsxRuntime.jsxs(react.Box, { children: [
673
+ /* @__PURE__ */ jsxRuntime.jsx(
674
+ react.IconButton,
675
+ {
676
+ icon: isOpen ? /* @__PURE__ */ jsxRuntime.jsx(icons.CloseIcon, { w: 3, h: 3 }) : /* @__PURE__ */ jsxRuntime.jsx(icons.HamburgerIcon, {}),
677
+ size: "md",
678
+ variant: "ghost",
679
+ "aria-label": "Toggle Navigation",
680
+ onClick: onToggle
681
+ }
682
+ ),
683
+ /* @__PURE__ */ jsxRuntime.jsx(react.Collapse, { in: isOpen, animateOpacity: true, children: /* @__PURE__ */ jsxRuntime.jsx(react.Box, { position: "absolute", top: 14, right: 0, w: "100vw", px: 2, children: /* @__PURE__ */ jsxRuntime.jsx(react.Stack, { as: "ul", spacing: 2, p: 2, w: "100%", borderRadius: "md", boxShadow: "md", bg: background, children: menu.map((item) => /* @__PURE__ */ jsxRuntime.jsx(react.Flex, { as: "li", children: /* @__PURE__ */ jsxRuntime.jsx(MobileNavItem, { ...item }) }, item.url)) }) }) })
684
+ ] }) : null;
685
+ };
686
+ const Navigation = ({ menu }) => {
687
+ const isDesktop = react.useBreakpointValue({ base: false, md: true });
688
+ return isDesktop ? /* @__PURE__ */ jsxRuntime.jsx(DesktopNavigation, { menu }) : /* @__PURE__ */ jsxRuntime.jsx(MobileNavigation, { menu });
689
+ };
690
+ const Header = () => {
691
+ var _a, _b;
692
+ const { configs } = index.useSiteContext();
693
+ const navigation = ((_a = configs == null ? void 0 : configs.header) == null ? void 0 : _a.navigation) ?? [];
694
+ const toolbar = (_b = configs == null ? void 0 : configs.header) == null ? void 0 : _b.toolbar;
695
+ return /* @__PURE__ */ jsxRuntime.jsx(
696
+ react.Box,
697
+ {
698
+ as: "header",
699
+ position: "sticky",
700
+ top: 0,
701
+ bg: react.useColorModeValue("white", "gray.900"),
702
+ color: react.useColorModeValue("gray.700", "gray.200"),
703
+ boxShadow: "sm",
704
+ zIndex: 100,
705
+ children: /* @__PURE__ */ jsxRuntime.jsx(Container, { children: /* @__PURE__ */ jsxRuntime.jsxs(react.Flex, { as: "nav", gap: 2, py: 1, children: [
706
+ /* @__PURE__ */ jsxRuntime.jsx(Brand, { brand: /* @__PURE__ */ jsxRuntime.jsx(Logo, {}) }),
707
+ (!!navigation.length || !!toolbar) && /* @__PURE__ */ jsxRuntime.jsxs(
708
+ react.Flex,
709
+ {
710
+ as: "section",
711
+ flex: 1,
712
+ flexDir: { base: "row-reverse", md: "row" },
713
+ justifyContent: { base: "flex-end", md: "flex-start" },
714
+ align: "center",
715
+ gap: 2,
716
+ children: [
717
+ !!navigation.length && /* @__PURE__ */ jsxRuntime.jsx(react.Flex, { flex: { base: 0, md: 1 }, children: /* @__PURE__ */ jsxRuntime.jsx(Navigation, { menu: navigation }) }),
718
+ !!toolbar && /* @__PURE__ */ jsxRuntime.jsx(react.Flex, { gap: 2, flex: { base: 1, md: 0 }, justifyContent: "flex-end", children: toolbar })
719
+ ]
720
+ }
721
+ )
722
+ ] }) })
723
+ }
724
+ );
725
+ };
726
+ const Hero = ({ title, subtitle, content, link, image }) => {
727
+ return /* @__PURE__ */ jsxRuntime.jsx(react.Box, { as: "section", bg: "gray.900", children: /* @__PURE__ */ jsxRuntime.jsx(Container, { children: /* @__PURE__ */ jsxRuntime.jsxs(react.Flex, { direction: { base: "column", md: "row" }, children: [
728
+ /* @__PURE__ */ jsxRuntime.jsx(react.Flex, { align: "center", justify: { base: "center", md: "flex-start" }, flex: 1, py: 8, pe: 8, children: /* @__PURE__ */ jsxRuntime.jsxs(react.Stack, { spacing: 6, w: "full", maxW: "lg", children: [
729
+ /* @__PURE__ */ jsxRuntime.jsxs(react.Heading, { as: "h1", fontSize: { base: "3xl", md: "4xl", lg: "5xl" }, children: [
730
+ /* @__PURE__ */ jsxRuntime.jsxs(react.Text, { as: "span", display: "block", children: [
731
+ title,
732
+ " —"
733
+ ] }),
734
+ /* @__PURE__ */ jsxRuntime.jsx(react.Text, { as: "span", display: "block", color: "brand.400", children: subtitle })
735
+ ] }),
736
+ /* @__PURE__ */ jsxRuntime.jsx(react.Text, { fontSize: { base: "md", lg: "lg" }, color: "gray.500", children: content }),
737
+ !!link && /* @__PURE__ */ jsxRuntime.jsx(react.Flex, { direction: { base: "column", md: "row" }, children: /* @__PURE__ */ jsxRuntime.jsx(LinkButton, { ...link }) })
738
+ ] }) }),
739
+ image && /* @__PURE__ */ jsxRuntime.jsx(react.Flex, { display: { base: "none", md: "flex" }, flex: 1, children: image })
740
+ ] }) }) });
741
+ };
742
+ const Main = ({ children }) => {
743
+ return /* @__PURE__ */ jsxRuntime.jsx(
744
+ react.Flex,
745
+ {
746
+ as: "main",
747
+ direction: "column",
748
+ flexGrow: 1,
749
+ bg: react.useColorModeValue("white", "gray.800"),
750
+ color: react.useColorModeValue("gray.700", "gray.200"),
751
+ children
752
+ }
753
+ );
754
+ };
755
+ const ScrollToTop = () => {
756
+ const [isVisible, setIsVisible] = react$1.useState(false);
757
+ react$1.useEffect(() => {
758
+ const toggleVisibility = () => {
759
+ setIsVisible(window.scrollY > 300);
760
+ };
761
+ window.addEventListener("scroll", toggleVisibility);
762
+ return () => {
763
+ window.removeEventListener("scroll", toggleVisibility);
764
+ };
765
+ }, []);
766
+ function handleClick() {
767
+ window.scrollTo({
768
+ top: 0,
769
+ behavior: "smooth"
770
+ });
771
+ }
772
+ return /* @__PURE__ */ jsxRuntime.jsx(
773
+ react.Box,
774
+ {
775
+ position: "fixed",
776
+ bottom: { base: 4, md: 8, lg: 16 },
777
+ right: { base: 4, md: 8, lg: 16 },
778
+ zIndex: "1000",
779
+ opacity: isVisible ? 1 : 0,
780
+ transform: isVisible ? "translateY(0)" : "translateY(0.5rem)",
781
+ transition: "opacity 0.4s ease, transform 0.4s ease",
782
+ pointerEvents: isVisible ? "auto" : "none",
783
+ children: /* @__PURE__ */ jsxRuntime.jsx(
784
+ react.IconButton,
785
+ {
786
+ "aria-label": "Scroll to top",
787
+ icon: /* @__PURE__ */ jsxRuntime.jsx(icons.ChevronUpIcon, { w: 6, h: 6 }),
788
+ size: "lg",
789
+ shadow: "lg",
790
+ colorScheme: "brand",
791
+ isRound: true,
792
+ onClick: handleClick
793
+ }
794
+ )
795
+ }
796
+ );
797
+ };
798
+ const Layout = ({ children }) => {
799
+ const content = typeof children === "function" ? children({ Hero, Content }) : /* @__PURE__ */ jsxRuntime.jsx(Content, { children });
800
+ return /* @__PURE__ */ jsxRuntime.jsxs(react.Stack, { spacing: 0, position: "relative", w: "100%", minH: "100dvh", children: [
801
+ /* @__PURE__ */ jsxRuntime.jsx(Header, {}),
802
+ /* @__PURE__ */ jsxRuntime.jsx(Main, { children: content }),
803
+ /* @__PURE__ */ jsxRuntime.jsx(Footer, {}),
804
+ /* @__PURE__ */ jsxRuntime.jsx(ScrollToTop, {})
805
+ ] });
806
+ };
807
+ const List = ({ items, bullet = "—", render, ...boxProps }) => {
808
+ return /* @__PURE__ */ jsxRuntime.jsx(react.List, { pl: 0, ml: 2, mb: 4, ...boxProps, children: items.map((item, index2) => /* @__PURE__ */ jsxRuntime.jsxs(react.ListItem, { display: "flex", gap: 1, children: [
809
+ /* @__PURE__ */ jsxRuntime.jsx(react.Box, { children: bullet }),
810
+ render ? render(item) : item
811
+ ] }, index2)) });
812
+ };
813
+ const TitleMap = {
814
+ pros: "advantages",
815
+ cons: "disadvantages"
816
+ };
817
+ const IconMap = {
818
+ pros: icons.CheckCircleIcon,
819
+ cons: icons.WarningIcon
820
+ };
821
+ const IconColorMap = {
822
+ pros: "green.500",
823
+ cons: "red.500"
824
+ };
825
+ const BgColorMap = {
826
+ pros: "green",
827
+ cons: "red"
828
+ };
829
+ const ProsConsCard = ({ itemType, items }) => {
830
+ const { t } = reactI18next.useTranslation("prosCons");
831
+ return /* @__PURE__ */ jsxRuntime.jsxs(
832
+ react.Card,
833
+ {
834
+ as: "article",
835
+ flex: 1,
836
+ p: 2,
837
+ bgColor: react.useColorModeValue(`${BgColorMap[itemType]}.100`, `${BgColorMap[itemType]}.800`),
838
+ children: [
839
+ /* @__PURE__ */ jsxRuntime.jsx(
840
+ react.CardHeader,
841
+ {
842
+ as: "header",
843
+ p: 2,
844
+ borderTopRadius: "md",
845
+ bgColor: react.useColorModeValue("whiteAlpha.800", "blackAlpha.800"),
846
+ children: /* @__PURE__ */ jsxRuntime.jsx(react.Heading, { as: "h3", textTransform: "uppercase", fontSize: "xl", children: t(TitleMap[itemType]) })
847
+ }
848
+ ),
849
+ /* @__PURE__ */ jsxRuntime.jsx(
850
+ react.CardBody,
851
+ {
852
+ as: "section",
853
+ p: 2,
854
+ borderBottomRadius: "md",
855
+ bgColor: react.useColorModeValue("whiteAlpha.800", "blackAlpha.800"),
856
+ children: /* @__PURE__ */ jsxRuntime.jsx(react.List, { spacing: 4, p: 0, children: items.map(({ title, description }) => /* @__PURE__ */ jsxRuntime.jsxs(react.ListItem, { display: "flex", children: [
857
+ /* @__PURE__ */ jsxRuntime.jsx(react.ListIcon, { as: IconMap[itemType], w: 6, h: 6, color: IconColorMap[itemType] }),
858
+ /* @__PURE__ */ jsxRuntime.jsxs(react.Text, { fontWeight: "semibold", fontSize: "md", children: [
859
+ title,
860
+ !!description && /* @__PURE__ */ jsxRuntime.jsxs(react.Text, { as: "span", fontWeight: "normal", children: [
861
+ ": ",
862
+ description
863
+ ] })
864
+ ] })
865
+ ] }, title)) })
866
+ }
867
+ )
868
+ ]
869
+ }
870
+ );
871
+ };
872
+ const ProsCons = ({ items, ...boxProps }) => {
873
+ const { pros, cons } = items;
874
+ return /* @__PURE__ */ jsxRuntime.jsxs(react.Flex, { as: "section", direction: { base: "column", md: "row" }, gap: 4, ...boxProps, children: [
875
+ /* @__PURE__ */ jsxRuntime.jsx(ProsConsCard, { itemType: "pros", items: pros }),
876
+ /* @__PURE__ */ jsxRuntime.jsx(ProsConsCard, { itemType: "cons", items: cons })
877
+ ] });
878
+ };
879
+ const Seo = ({ children, siteMetadata, title, description, lang }) => {
880
+ const { title: defaultTitle, description: defaultDescription, lang: defaultLang, siteUrl } = siteMetadata;
881
+ return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
882
+ /* @__PURE__ */ jsxRuntime.jsx("html", { lang: lang ?? defaultLang }),
883
+ /* @__PURE__ */ jsxRuntime.jsx("title", { children: title ? typeof title === "string" ? title : title({
884
+ domain: index$1.getDomain(siteUrl),
885
+ currentYear: index$1.getCurrentYear(),
886
+ currentMonth: index$1.getCurrentMonth()
887
+ }) : defaultTitle }),
888
+ /* @__PURE__ */ jsxRuntime.jsx(
889
+ "meta",
890
+ {
891
+ name: "description",
892
+ content: description ? typeof description === "string" ? description : description({
893
+ domain: index$1.getDomain(siteUrl),
894
+ currentYear: index$1.getCurrentYear(),
895
+ currentMonth: index$1.getCurrentMonth()
896
+ }) : defaultDescription
897
+ }
898
+ ),
899
+ children
900
+ ] });
901
+ };
902
+ const Table = ({
903
+ columnNumber,
904
+ items,
905
+ caption,
906
+ bordered = false,
907
+ striped = true,
908
+ scrollable,
909
+ ...boxProps
910
+ }) => {
911
+ const headerItems = items.slice(0, columnNumber);
912
+ const bodyItems = items.slice(columnNumber);
913
+ return /* @__PURE__ */ jsxRuntime.jsxs(
914
+ react.TableContainer,
915
+ {
916
+ border: bordered ? void 0 : "none",
917
+ ...scrollable ? { maxH: "50vh", overflowY: "auto" } : {},
918
+ ...boxProps,
919
+ children: [
920
+ /* @__PURE__ */ jsxRuntime.jsxs(react.Table, { variant: striped ? "striped" : "simple", children: [
921
+ /* @__PURE__ */ jsxRuntime.jsx(react.Thead, { ...scrollable ? { position: "sticky", top: 0, zIndex: 1, bg: "gray.800" } : {}, children: /* @__PURE__ */ jsxRuntime.jsx(react.Tr, { children: headerItems.map((item, index2) => /* @__PURE__ */ jsxRuntime.jsx(react.Th, { children: item }, index2)) }) }),
922
+ /* @__PURE__ */ jsxRuntime.jsx(react.Tbody, { children: Array.from({ length: Math.ceil(bodyItems.length / columnNumber) }, (_, rowIndex) => /* @__PURE__ */ jsxRuntime.jsx(react.Tr, { children: Array.from({ length: columnNumber }, (_2, colIndex) => /* @__PURE__ */ jsxRuntime.jsx(react.Td, { children: bodyItems[rowIndex * columnNumber + colIndex] || "" }, colIndex)) }, rowIndex)) })
923
+ ] }),
924
+ !!caption && /* @__PURE__ */ jsxRuntime.jsx(react.TableCaption, { children: caption })
925
+ ]
926
+ }
927
+ );
928
+ };
929
+ const Tabs = ({ items, render, ...boxProps }) => {
930
+ const { tabs, panels } = react$1.useMemo(() => {
931
+ const tabs2 = [];
932
+ const panels2 = [];
933
+ items.forEach(({ content, ...tab }) => {
934
+ tabs2.push(tab);
935
+ panels2.push(content);
936
+ });
937
+ return { tabs: tabs2, panels: panels2 };
938
+ }, []);
939
+ return /* @__PURE__ */ jsxRuntime.jsxs(react.Tabs, { overflow: "hidden", colorScheme: "brand", ...boxProps, children: [
940
+ /* @__PURE__ */ jsxRuntime.jsx(react.TabList, { overflow: "auto hidden", children: tabs.map(({ label, icon }, index2) => /* @__PURE__ */ jsxRuntime.jsx(react.Tab, { children: /* @__PURE__ */ jsxRuntime.jsx(react.Text, { as: "h3", isTruncated: true, children: icon ? `${icon} ${label}` : label }) }, index2)) }),
941
+ /* @__PURE__ */ jsxRuntime.jsx(react.TabPanels, { children: panels.map((panel, index2) => /* @__PURE__ */ jsxRuntime.jsx(react.TabPanel, { children: render(panel) }, index2)) })
942
+ ] });
943
+ };
944
+ exports.Author = Author;
945
+ exports.BonusCard = BonusCard;
946
+ exports.Center = Center;
947
+ exports.ContactForm = ContactForm;
948
+ exports.Expert = Expert;
949
+ exports.ExpertTip = ExpertTip;
950
+ exports.Faq = Faq;
951
+ exports.FeatureCard = FeatureCard;
952
+ exports.Features = Features;
953
+ exports.GameCard = GameCard;
954
+ exports.GameDemo = GameDemo;
955
+ exports.GameInfo = GameInfo;
956
+ exports.Grid = Grid;
957
+ exports.HowTo = HowTo;
958
+ exports.Layout = Layout;
959
+ exports.LinkButton = LinkButton;
960
+ exports.List = List;
961
+ exports.ProsCons = ProsCons;
962
+ exports.PulseButton = PulseButton;
963
+ exports.Seo = Seo;
964
+ exports.Table = Table;
965
+ exports.Tabs = Tabs;