@anywayseo/tools 5.1.0 → 5.3.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 (39) hide show
  1. package/dist/components/base/image/index.d.ts +10 -0
  2. package/dist/components/base/index.d.ts +1 -0
  3. package/dist/components/game-demo/preview/index.d.ts +2 -2
  4. package/dist/components/game-info/index.d.ts +2 -1
  5. package/dist/components/game-info/utils.d.ts +3 -1
  6. package/dist/components/index.cjs +3 -2
  7. package/dist/components/index.mjs +3 -2
  8. package/dist/components/strapi-component/utils.d.ts +9 -0
  9. package/dist/hooks/index.cjs +1 -1
  10. package/dist/hooks/index.mjs +1 -1
  11. package/dist/i18n/index.cjs +1 -1
  12. package/dist/i18n/index.mjs +1 -1
  13. package/dist/{index-Bu4S7kG8.mjs → index-BCK4kr6V.mjs} +13 -21
  14. package/dist/{index-D0yXUsJz.js → index-BGMR4f6W.js} +73 -63
  15. package/dist/{index-D34TfBTR.js → index-BICcOaT7.js} +9 -17
  16. package/dist/{index-BIdYBT1G.js → index-BbxOP7UY.js} +9 -5
  17. package/dist/{index-B9GEoC68.js → index-BltrZp3R.js} +33 -10
  18. package/dist/{index-CACDltm3.mjs → index-Bts2DBYS.mjs} +12 -12
  19. package/dist/{index-tJcccH0B.mjs → index-Bwlxdh5F.mjs} +25 -2
  20. package/dist/{index-CrmmG8yy.mjs → index-C4sJXfkN.mjs} +7 -3
  21. package/dist/{index-BnmGE5_x.js → index-CAfBnNV6.js} +1 -1
  22. package/dist/{index-BHfpWNqh.js → index-CJVr79Z2.js} +12 -12
  23. package/dist/{index-BCuXOiT9.mjs → index-CjaAcLJf.mjs} +71 -61
  24. package/dist/{index-QazOxABc.mjs → index-tj12BA6U.mjs} +1 -1
  25. package/dist/index.cjs +7 -7
  26. package/dist/index.mjs +11 -11
  27. package/dist/providers/index.cjs +2 -2
  28. package/dist/providers/index.mjs +2 -2
  29. package/dist/types/components/how-to/index.d.ts +2 -2
  30. package/dist/types/components/image/index.d.ts +4 -2
  31. package/dist/types/content/author/index.d.ts +2 -2
  32. package/dist/types/site/index.d.ts +3 -3
  33. package/dist/utils/currency/index.d.ts +2 -0
  34. package/dist/utils/index.cjs +1 -2
  35. package/dist/utils/index.d.ts +1 -0
  36. package/dist/utils/index.mjs +5 -6
  37. package/dist/utils/numbers/index.d.ts +1 -17
  38. package/dist/utils/numbers/types.d.ts +15 -1
  39. package/package.json +3 -2
@@ -1,35 +1,57 @@
1
1
  "use strict";
2
2
  const jsxRuntime = require("react/jsx-runtime");
3
- const react = require("react");
3
+ const react = require("@chakra-ui/react");
4
+ const Zoom = require("react-medium-image-zoom");
5
+ const react$1 = require("react");
4
6
  const gatsby = require("gatsby");
5
- require("@chakra-ui/react");
6
7
  require("@mdx-js/react");
7
8
  require("react-i18next");
8
9
  require("./index-C6MG_f24.js");
9
- require("./index-BHfpWNqh.js");
10
+ require("./index-CJVr79Z2.js");
10
11
  const index = require("./index-WFgDSB1A.js");
11
12
  const index$1 = require("./index-At00w6EN.js");
12
- const SiteContext = react.createContext(null);
13
+ const Image = ({ src, mode = "default", hasZoom, ...plainImageProps }) => {
14
+ if (!src) {
15
+ return null;
16
+ }
17
+ let image;
18
+ if (typeof src === "string") {
19
+ image = /* @__PURE__ */ jsxRuntime.jsx(
20
+ react.Image,
21
+ {
22
+ src,
23
+ ...mode === "thumbnail" && { aspectRatio: "16/9", objectFit: "cover", objectPosition: "center" },
24
+ ...plainImageProps
25
+ }
26
+ );
27
+ } else if (src.props.image) {
28
+ image = mode === "thumbnail" ? /* @__PURE__ */ jsxRuntime.jsx(react.Box, { aspectRatio: "16/9", children: src }) : src;
29
+ } else {
30
+ return null;
31
+ }
32
+ return hasZoom ? /* @__PURE__ */ jsxRuntime.jsx(Zoom, { wrapElement: "span", zoomMargin: 40, children: image }) : image;
33
+ };
34
+ const SiteContext = react$1.createContext(null);
13
35
  const SiteProvider = ({ children, ...context }) => {
14
- const value = react.useMemo(() => context, []);
36
+ const value = react$1.useMemo(() => context, []);
15
37
  return /* @__PURE__ */ jsxRuntime.jsx(SiteContext.Provider, { value, children });
16
38
  };
17
39
  function useSiteContext() {
18
- const context = react.useContext(SiteContext);
40
+ const context = react$1.useContext(SiteContext);
19
41
  if (!context) {
20
42
  throw new Error("useSiteContext must be used within SiteProvider");
21
43
  }
22
44
  return context;
23
45
  }
24
- const PageContext = react.createContext(null);
46
+ const PageContext = react$1.createContext(null);
25
47
  const PageProvider = ({ children, location }) => {
26
48
  const { localization } = useSiteContext();
27
49
  const { currentLocale } = index.useLocalization({ location, ...localization });
28
- const value = react.useMemo(() => ({ currentLocale }), [currentLocale]);
50
+ const value = react$1.useMemo(() => ({ currentLocale }), [currentLocale]);
29
51
  return /* @__PURE__ */ jsxRuntime.jsx(PageContext.Provider, { value, children });
30
52
  };
31
53
  function usePageContext() {
32
- const context = react.useContext(PageContext);
54
+ const context = react$1.useContext(PageContext);
33
55
  if (!context) {
34
56
  throw new Error("usePageContext must be used within PageProvider");
35
57
  }
@@ -49,13 +71,14 @@ function getLocalizedPath(path, currentLocaleCode, defaultLocaleCode) {
49
71
  }
50
72
  return `${localePrefix}${normalizePath(path)}`;
51
73
  }
52
- const Link = react.forwardRef(({ to, ...props }, ref) => {
74
+ const Link = react$1.forwardRef(({ to, ...props }, ref) => {
53
75
  const { localization } = useSiteContext();
54
76
  const { currentLocale } = usePageContext();
55
77
  const defaultLocale = localization.defaultLocale;
56
78
  const path = getLocalizedPath(to, currentLocale.code, defaultLocale.code);
57
79
  return /* @__PURE__ */ jsxRuntime.jsx(gatsby.Link, { ref, to: path, ...props });
58
80
  });
81
+ exports.Image = Image;
59
82
  exports.Link = Link;
60
83
  exports.PageProvider = PageProvider;
61
84
  exports.SiteProvider = SiteProvider;
@@ -75,9 +75,9 @@ const gameInfo$4 = {
75
75
  [GameCharacteristic.HasFreeSpins]: "Freispiele",
76
76
  [GameCharacteristic.HasProgressiveJackpot]: "Progressiver Jackpot",
77
77
  [GameCharacteristic.Languages]: "Sprachen",
78
- [GameCharacteristic.MaxWin]: "Maximaler Gewinn",
79
- [GameCharacteristic.MaxBet]: "Maximaler Einsatz",
80
- [GameCharacteristic.MinBet]: "Minimaler Einsatz",
78
+ [GameCharacteristic.MaxWin]: "Max Gewinn",
79
+ [GameCharacteristic.MaxBet]: "Max Einsatz ({{currency}})",
80
+ [GameCharacteristic.MinBet]: "Min Einsatz ({{currency}})",
81
81
  [GameCharacteristic.Name]: "Name",
82
82
  [GameCharacteristic.PayLines]: "Anzahl der Gewinnlinien",
83
83
  [GameCharacteristic.ReelsNumber]: "Anzahl der Walzen",
@@ -195,8 +195,8 @@ const gameInfo$3 = {
195
195
  [GameCharacteristic.HasProgressiveJackpot]: "Progressive Jackpot",
196
196
  [GameCharacteristic.Languages]: "Languages",
197
197
  [GameCharacteristic.MaxWin]: "Max Win",
198
- [GameCharacteristic.MaxBet]: "Max Bet",
199
- [GameCharacteristic.MinBet]: "Min Bet",
198
+ [GameCharacteristic.MaxBet]: "Max Bet ({{currency}})",
199
+ [GameCharacteristic.MinBet]: "Min Bet ({{currency}})",
200
200
  [GameCharacteristic.Name]: "Name",
201
201
  [GameCharacteristic.PayLines]: "Pay Lines Number",
202
202
  [GameCharacteristic.ReelsNumber]: "Reels Number",
@@ -314,8 +314,8 @@ const gameInfo$2 = {
314
314
  [GameCharacteristic.HasProgressiveJackpot]: "Jackpot Progressivo",
315
315
  [GameCharacteristic.Languages]: "Lingue",
316
316
  [GameCharacteristic.MaxWin]: "Vincita Massima",
317
- [GameCharacteristic.MaxBet]: "Puntata Massima",
318
- [GameCharacteristic.MinBet]: "Puntata Minima",
317
+ [GameCharacteristic.MaxBet]: "Puntata Massima ({{currency}})",
318
+ [GameCharacteristic.MinBet]: "Puntata Minima ({{currency}})",
319
319
  [GameCharacteristic.Name]: "Nome",
320
320
  [GameCharacteristic.PayLines]: "Numero di Linee di Pagamento",
321
321
  [GameCharacteristic.ReelsNumber]: "Numero di Rulli",
@@ -432,9 +432,9 @@ const gameInfo$1 = {
432
432
  [GameCharacteristic.HasFreeSpins]: "Фриспины",
433
433
  [GameCharacteristic.HasProgressiveJackpot]: "Прогрессивный джекпот",
434
434
  [GameCharacteristic.Languages]: "Языки",
435
- [GameCharacteristic.MaxWin]: "Максимальный выигрыш",
436
- [GameCharacteristic.MaxBet]: "Максимальная ставка",
437
- [GameCharacteristic.MinBet]: "Минимальная ставка",
435
+ [GameCharacteristic.MaxWin]: "Макс. выигрыш",
436
+ [GameCharacteristic.MaxBet]: "Макс. ставка ({{currency}})",
437
+ [GameCharacteristic.MinBet]: "Мин. ставка ({{currency}})",
438
438
  [GameCharacteristic.Name]: "Название",
439
439
  [GameCharacteristic.PayLines]: "Количество линий выплат",
440
440
  [GameCharacteristic.ReelsNumber]: "Количество барабанов",
@@ -552,8 +552,8 @@ const gameInfo = {
552
552
  [GameCharacteristic.HasProgressiveJackpot]: "Jackpot progressif",
553
553
  [GameCharacteristic.Languages]: "Langues",
554
554
  [GameCharacteristic.MaxWin]: "Gain maximal",
555
- [GameCharacteristic.MaxBet]: "Mise maximale",
556
- [GameCharacteristic.MinBet]: "Mise minimale",
555
+ [GameCharacteristic.MaxBet]: "Mise maximale ({{currency}})",
556
+ [GameCharacteristic.MinBet]: "Mise minimale ({{currency}})",
557
557
  [GameCharacteristic.Name]: "Nom",
558
558
  [GameCharacteristic.PayLines]: "Nombre de lignes de paiement",
559
559
  [GameCharacteristic.ReelsNumber]: "Nombre de rouleaux",
@@ -1,13 +1,35 @@
1
1
  import { jsx } from "react/jsx-runtime";
2
+ import { Image as Image$1, Box } from "@chakra-ui/react";
3
+ import Zoom from "react-medium-image-zoom";
2
4
  import { createContext, useContext, useMemo, forwardRef } from "react";
3
5
  import { Link as Link$1 } from "gatsby";
4
- import "@chakra-ui/react";
5
6
  import "@mdx-js/react";
6
7
  import "react-i18next";
7
8
  import "./index-BJRvnR8Q.mjs";
8
- import "./index-CACDltm3.mjs";
9
+ import "./index-Bts2DBYS.mjs";
9
10
  import { u as useLocalization } from "./index-BzbpMLDD.mjs";
10
11
  import { i as isRelativePath } from "./index-BmaWfWLV.mjs";
12
+ const Image = ({ src, mode = "default", hasZoom, ...plainImageProps }) => {
13
+ if (!src) {
14
+ return null;
15
+ }
16
+ let image;
17
+ if (typeof src === "string") {
18
+ image = /* @__PURE__ */ jsx(
19
+ Image$1,
20
+ {
21
+ src,
22
+ ...mode === "thumbnail" && { aspectRatio: "16/9", objectFit: "cover", objectPosition: "center" },
23
+ ...plainImageProps
24
+ }
25
+ );
26
+ } else if (src.props.image) {
27
+ image = mode === "thumbnail" ? /* @__PURE__ */ jsx(Box, { aspectRatio: "16/9", children: src }) : src;
28
+ } else {
29
+ return null;
30
+ }
31
+ return hasZoom ? /* @__PURE__ */ jsx(Zoom, { wrapElement: "span", zoomMargin: 40, children: image }) : image;
32
+ };
11
33
  const SiteContext = createContext(null);
12
34
  const SiteProvider = ({ children, ...context }) => {
13
35
  const value = useMemo(() => context, []);
@@ -56,6 +78,7 @@ const Link = forwardRef(({ to, ...props }, ref) => {
56
78
  return /* @__PURE__ */ jsx(Link$1, { ref, to: path, ...props });
57
79
  });
58
80
  export {
81
+ Image as I,
59
82
  Link as L,
60
83
  PageProvider as P,
61
84
  SiteProvider as S,
@@ -1,11 +1,11 @@
1
1
  import { jsx } from "react/jsx-runtime";
2
2
  import { Text, UnorderedList, OrderedList, Heading, Link } from "@chakra-ui/react";
3
3
  import { MDXProvider } from "@mdx-js/react";
4
+ import { I as Image, L as Link$1 } from "./index-Bwlxdh5F.mjs";
4
5
  import "react";
5
6
  import "react-i18next";
6
- import { L as Link$1 } from "./index-tJcccH0B.mjs";
7
7
  import "./index-BJRvnR8Q.mjs";
8
- import "./index-CACDltm3.mjs";
8
+ import "./index-Bts2DBYS.mjs";
9
9
  import { i as isRelativePath } from "./index-BmaWfWLV.mjs";
10
10
  function omitProps(props, omittedKeys) {
11
11
  const result = { ...props };
@@ -36,6 +36,9 @@ function renderLink({
36
36
  }
37
37
  );
38
38
  }
39
+ function renderImage(props) {
40
+ return /* @__PURE__ */ jsx(Image, { ...props, mt: 4, mb: 4, hasZoom: true });
41
+ }
39
42
  const components = {
40
43
  h1: preprocessProps((props) => /* @__PURE__ */ jsx(Heading, { as: "h1", size: "xl", mb: 4, ...props })),
41
44
  h2: preprocessProps((props) => /* @__PURE__ */ jsx(Heading, { as: "h2", size: "lg", mt: 6, mb: 4, ...props })),
@@ -43,7 +46,8 @@ const components = {
43
46
  ol: preprocessProps((props) => /* @__PURE__ */ jsx(OrderedList, { mb: 4, ...props })),
44
47
  ul: preprocessProps((props) => /* @__PURE__ */ jsx(UnorderedList, { mb: 4, ...props })),
45
48
  p: preprocessProps((props) => /* @__PURE__ */ jsx(Text, { mb: 4, ...props })),
46
- a: preprocessProps((props) => renderLink(props))
49
+ a: preprocessProps((props) => renderLink(props)),
50
+ img: preprocessProps((props) => renderImage(props))
47
51
  };
48
52
  const MdxProvider = ({ children }) => {
49
53
  return /* @__PURE__ */ jsx(MDXProvider, { components, children });
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  const react = require("@chakra-ui/react");
3
3
  require("./index-C6MG_f24.js");
4
- require("./index-BHfpWNqh.js");
4
+ require("./index-CJVr79Z2.js");
5
5
  const index = require("./index-CbuiYkSg.js");
6
6
  function usePrimaryColors() {
7
7
  const color = react.useColorModeValue(index.LIGHT_THEME_COLOR, index.DARK_THEME_COLOR);
@@ -76,9 +76,9 @@ const gameInfo$4 = {
76
76
  [GameCharacteristic.HasFreeSpins]: "Freispiele",
77
77
  [GameCharacteristic.HasProgressiveJackpot]: "Progressiver Jackpot",
78
78
  [GameCharacteristic.Languages]: "Sprachen",
79
- [GameCharacteristic.MaxWin]: "Maximaler Gewinn",
80
- [GameCharacteristic.MaxBet]: "Maximaler Einsatz",
81
- [GameCharacteristic.MinBet]: "Minimaler Einsatz",
79
+ [GameCharacteristic.MaxWin]: "Max Gewinn",
80
+ [GameCharacteristic.MaxBet]: "Max Einsatz ({{currency}})",
81
+ [GameCharacteristic.MinBet]: "Min Einsatz ({{currency}})",
82
82
  [GameCharacteristic.Name]: "Name",
83
83
  [GameCharacteristic.PayLines]: "Anzahl der Gewinnlinien",
84
84
  [GameCharacteristic.ReelsNumber]: "Anzahl der Walzen",
@@ -196,8 +196,8 @@ const gameInfo$3 = {
196
196
  [GameCharacteristic.HasProgressiveJackpot]: "Progressive Jackpot",
197
197
  [GameCharacteristic.Languages]: "Languages",
198
198
  [GameCharacteristic.MaxWin]: "Max Win",
199
- [GameCharacteristic.MaxBet]: "Max Bet",
200
- [GameCharacteristic.MinBet]: "Min Bet",
199
+ [GameCharacteristic.MaxBet]: "Max Bet ({{currency}})",
200
+ [GameCharacteristic.MinBet]: "Min Bet ({{currency}})",
201
201
  [GameCharacteristic.Name]: "Name",
202
202
  [GameCharacteristic.PayLines]: "Pay Lines Number",
203
203
  [GameCharacteristic.ReelsNumber]: "Reels Number",
@@ -315,8 +315,8 @@ const gameInfo$2 = {
315
315
  [GameCharacteristic.HasProgressiveJackpot]: "Jackpot Progressivo",
316
316
  [GameCharacteristic.Languages]: "Lingue",
317
317
  [GameCharacteristic.MaxWin]: "Vincita Massima",
318
- [GameCharacteristic.MaxBet]: "Puntata Massima",
319
- [GameCharacteristic.MinBet]: "Puntata Minima",
318
+ [GameCharacteristic.MaxBet]: "Puntata Massima ({{currency}})",
319
+ [GameCharacteristic.MinBet]: "Puntata Minima ({{currency}})",
320
320
  [GameCharacteristic.Name]: "Nome",
321
321
  [GameCharacteristic.PayLines]: "Numero di Linee di Pagamento",
322
322
  [GameCharacteristic.ReelsNumber]: "Numero di Rulli",
@@ -433,9 +433,9 @@ const gameInfo$1 = {
433
433
  [GameCharacteristic.HasFreeSpins]: "Фриспины",
434
434
  [GameCharacteristic.HasProgressiveJackpot]: "Прогрессивный джекпот",
435
435
  [GameCharacteristic.Languages]: "Языки",
436
- [GameCharacteristic.MaxWin]: "Максимальный выигрыш",
437
- [GameCharacteristic.MaxBet]: "Максимальная ставка",
438
- [GameCharacteristic.MinBet]: "Минимальная ставка",
436
+ [GameCharacteristic.MaxWin]: "Макс. выигрыш",
437
+ [GameCharacteristic.MaxBet]: "Макс. ставка ({{currency}})",
438
+ [GameCharacteristic.MinBet]: "Мин. ставка ({{currency}})",
439
439
  [GameCharacteristic.Name]: "Название",
440
440
  [GameCharacteristic.PayLines]: "Количество линий выплат",
441
441
  [GameCharacteristic.ReelsNumber]: "Количество барабанов",
@@ -553,8 +553,8 @@ const gameInfo = {
553
553
  [GameCharacteristic.HasProgressiveJackpot]: "Jackpot progressif",
554
554
  [GameCharacteristic.Languages]: "Langues",
555
555
  [GameCharacteristic.MaxWin]: "Gain maximal",
556
- [GameCharacteristic.MaxBet]: "Mise maximale",
557
- [GameCharacteristic.MinBet]: "Mise minimale",
556
+ [GameCharacteristic.MaxBet]: "Mise maximale ({{currency}})",
557
+ [GameCharacteristic.MinBet]: "Mise minimale ({{currency}})",
558
558
  [GameCharacteristic.Name]: "Nom",
559
559
  [GameCharacteristic.PayLines]: "Nombre de lignes de paiement",
560
560
  [GameCharacteristic.ReelsNumber]: "Nombre de rouleaux",
@@ -1,15 +1,16 @@
1
1
  import { jsxs, jsx, Fragment } from "react/jsx-runtime";
2
- import { Box, Collapse, Text, Button, Flex, Stack, Image, Center as Center$1, SimpleGrid, Link as Link$1, Card, CardHeader, Heading, CardBody, Popover, PopoverTrigger, Portal, PopoverContent, PopoverBody, CardFooter, useToast, useColorModeValue, VStack, FormControl, FormLabel, InputGroup, InputLeftElement, Input, Textarea, Accordion, AccordionItem, AccordionButton, AccordionIcon, AccordionPanel, LinkBox, LinkOverlay, IconButton, AbsoluteCenter, Spinner, useDisclosure, Divider, Circle, Container as Container$1, Menu, MenuButton, HStack, Icon, MenuList, MenuItem, List as List$1, ListItem, ListIcon, TableContainer, Table as Table$1, Thead, Tr, Th, Tbody, Td, TableCaption, Tabs as Tabs$1, TabList, Tab, TabPanels, TabPanel } from "@chakra-ui/react";
2
+ import { Box, Collapse, Text, Button, Flex, Stack, Center as Center$1, SimpleGrid, Link as Link$1, Card, CardHeader, Heading, CardBody, Popover, PopoverTrigger, Portal, PopoverContent, PopoverBody, CardFooter, useToast, useColorModeValue, VStack, FormControl, FormLabel, InputGroup, InputLeftElement, Input, Textarea, Accordion, AccordionItem, AccordionButton, AccordionIcon, AccordionPanel, LinkBox, LinkOverlay, IconButton, AbsoluteCenter, Spinner, useDisclosure, Divider, Circle, Container as Container$1, Menu, MenuButton, HStack, Icon, MenuList, MenuItem, List as List$1, ListItem, ListIcon, TableContainer, Table as Table$1, Thead, Tr, Th, Tbody, Td, TableCaption, Tabs as Tabs$1, TabList, Tab, TabPanels, TabPanel } from "@chakra-ui/react";
3
3
  import { useTranslation } from "react-i18next";
4
- import { a as useSiteContext, L as Link, u as usePageContext } from "./index-tJcccH0B.mjs";
4
+ import "react-medium-image-zoom";
5
+ import { I as Image, a as useSiteContext, L as Link, u as usePageContext } from "./index-Bwlxdh5F.mjs";
5
6
  import { useRef, useState, useLayoutEffect, Fragment as Fragment$1, useMemo, forwardRef, useEffect } from "react";
6
7
  import { A as Animation } from "./index-BJRvnR8Q.mjs";
7
- import { a as GameCharacteristic } from "./index-CACDltm3.mjs";
8
+ import { a as GameCharacteristic } from "./index-Bts2DBYS.mjs";
8
9
  import { useMDXComponents } from "@mdx-js/react";
9
10
  import { EmailIcon, StarIcon, CloseIcon, ViewOffIcon, ViewIcon, ChevronDownIcon, ChevronRightIcon, HamburgerIcon, ChevronUpIcon, WarningIcon, CheckCircleIcon } from "@chakra-ui/icons";
10
- import { e as getSeededRandomComparator, d as randomComparator, b as formatNumber, c as getCurrencySymbol, f as formatDate, g as getCurrentYear, a as getCurrentMonth } from "./index-Bu4S7kG8.mjs";
11
+ import { e as getSeededRandomComparator, d as randomComparator, g as getCurrencySymbol, c as formatNumber, f as formatDate, a as getCurrentYear, b as getCurrentMonth } from "./index-BCK4kr6V.mjs";
11
12
  import { i as isRelativePath, b as buildPath } from "./index-BmaWfWLV.mjs";
12
- import { u as usePrimaryColors } from "./index-QazOxABc.mjs";
13
+ import { u as usePrimaryColors } from "./index-tj12BA6U.mjs";
13
14
  import { t } from "i18next";
14
15
  import Markdown from "react-markdown";
15
16
  const ONE_LINE_HEIGHT = 24;
@@ -38,22 +39,20 @@ const Bio = ({ content, maxLines = 1 }) => {
38
39
  };
39
40
  const Author = ({ author, variant }) => {
40
41
  const { name, role, bio, avatar } = author;
41
- const imageComponent = typeof avatar === "string" ? /* @__PURE__ */ jsx(Image, { src: avatar, alt: name, rounded: "full" }) : avatar;
42
42
  if (variant === "short") {
43
- return /* @__PURE__ */ jsxs(Flex, { as: "article", align: "center", gap: 4, children: [
44
- !!imageComponent && /* @__PURE__ */ jsx(Box, { w: 12, h: 12, children: imageComponent }),
43
+ return /* @__PURE__ */ jsxs(Flex, { align: "center", gap: 4, children: [
44
+ /* @__PURE__ */ jsx(Box, { w: 12, h: 12, children: /* @__PURE__ */ jsx(Image, { src: avatar, alt: name, rounded: "full" }) }),
45
45
  /* @__PURE__ */ jsxs(Box, { fontWeight: "semibold", children: [
46
46
  /* @__PURE__ */ jsx(Text, { children: name }),
47
47
  /* @__PURE__ */ jsx(Text, { color: "gray.500", children: role })
48
48
  ] })
49
49
  ] });
50
50
  }
51
- return /* @__PURE__ */ jsxs(Fragment, { children: [
52
- !!imageComponent && /* @__PURE__ */ jsx(Flex, { grow: 1, maxW: { base: 48, sm: 32 }, children: imageComponent }),
53
- /* @__PURE__ */ jsx(Flex, { w: "100%", children: /* @__PURE__ */ jsxs(Stack, { children: [
51
+ return /* @__PURE__ */ jsxs(Flex, { direction: { base: "column", sm: "row" }, align: { base: "center", sm: "flex-start" }, gap: 4, children: [
52
+ /* @__PURE__ */ jsx(Flex, { flex: 1, maxW: { base: 48, sm: 32 }, children: /* @__PURE__ */ jsx(Image, { src: avatar, alt: name, rounded: "full" }) }),
53
+ /* @__PURE__ */ jsx(Flex, { flex: 1, children: /* @__PURE__ */ jsxs(Stack, { children: [
54
54
  /* @__PURE__ */ jsxs(Text, { fontSize: "lg", fontWeight: 600, children: [
55
- name,
56
- ", ",
55
+ `${name}, `,
57
56
  /* @__PURE__ */ jsx(Text, { as: "span", color: "gray.500", children: role })
58
57
  ] }),
59
58
  /* @__PURE__ */ jsx(Bio, { content: bio })
@@ -83,10 +82,11 @@ const LinkButton = ({
83
82
  const { config } = useSiteContext();
84
83
  const { color, invertedColor } = usePrimaryColors();
85
84
  const isInvertedColor = (_a = config == null ? void 0 : config.theme) == null ? void 0 : _a.isInvertedColor;
86
- const isInternalLink = linkType === "redirect" || isRelativePath(href);
85
+ const isRedirectLink = linkType === "redirect";
86
+ const isInternalLink = isRelativePath(href);
87
87
  const LinkComponent = isInternalLink ? Link : Link$1;
88
88
  const hrefKey = isInternalLink ? "to" : "href";
89
- const hrefValue = linkType === "redirect" ? `/follow?to=${href}` : href;
89
+ const hrefValue = isRedirectLink ? `/follow?to=${href}` : href;
90
90
  return /* @__PURE__ */ jsx(
91
91
  Button,
92
92
  {
@@ -103,7 +103,8 @@ const LinkButton = ({
103
103
  ...href ? {
104
104
  as: LinkComponent,
105
105
  [hrefKey]: hrefValue,
106
- rel: "nofollow"
106
+ target: isRedirectLink ? "_blank" : "_self",
107
+ rel: isInternalLink ? "" : "noopener noreferrer nofollow"
107
108
  } : {},
108
109
  children: label
109
110
  }
@@ -113,16 +114,7 @@ const AuthorCard = ({ author, ...boxProps }) => {
113
114
  const { t: t2 } = useTranslation("author");
114
115
  return /* @__PURE__ */ jsxs(Card, { as: "article", variant: "filled", ...boxProps, children: [
115
116
  /* @__PURE__ */ jsx(CardHeader, { pb: 0, children: /* @__PURE__ */ jsx(Heading, { size: "md", children: t2("title") }) }),
116
- /* @__PURE__ */ jsx(
117
- CardBody,
118
- {
119
- display: "flex",
120
- flexDirection: { base: "column", sm: "row" },
121
- alignItems: { base: "center", sm: "flex-start" },
122
- gap: 4,
123
- children: /* @__PURE__ */ jsx(Author, { author, variant: "full" })
124
- }
125
- )
117
+ /* @__PURE__ */ jsx(CardBody, { children: /* @__PURE__ */ jsx(Author, { author, variant: "full" }) })
126
118
  ] });
127
119
  };
128
120
  const BonusCardContent = ({ content, buttonColor }) => {
@@ -335,7 +327,7 @@ const GameCard = ({ name, description, image, href, height = "auto" }) => {
335
327
  height,
336
328
  _hover: { transform: "scale(1.05)" },
337
329
  children: [
338
- typeof image === "string" ? /* @__PURE__ */ jsx(Image, { src: image, alt: name, w: "100%", aspectRatio: "16/9", objectFit: "cover", objectPosition: "center" }) : !!image && /* @__PURE__ */ jsx(Box, { w: "100%", aspectRatio: "16/9", children: image }),
330
+ /* @__PURE__ */ jsx(Image, { src: image, alt: name, mode: "thumbnail" }),
339
331
  /* @__PURE__ */ jsxs(Box, { as: "section", rounded: "md", p: 4, children: [
340
332
  /* @__PURE__ */ jsx(Text, { as: "span", children: href ? /* @__PURE__ */ jsx(LinkOverlay, { href, children: name }) : name }),
341
333
  !!description && /* @__PURE__ */ jsx(Text, { fontSize: "sm", color: "gray.600", children: description })
@@ -427,9 +419,8 @@ const GameDemoContent = ({
427
419
  };
428
420
  const GameDemoPreview = ({ image, alt, href, imageFit = "contain", onPlayDemo }) => {
429
421
  const { t: t2 } = useTranslation("gameDemo");
430
- const imageComponent = typeof image === "string" ? /* @__PURE__ */ jsx(Image, { src: image, alt, objectFit: imageFit, w: "100%", h: "100%" }) : image;
431
422
  return /* @__PURE__ */ jsxs(Fragment, { children: [
432
- imageComponent,
423
+ /* @__PURE__ */ jsx(Image, { src: image, alt, objectFit: imageFit, w: "100%", h: "100%" }),
433
424
  /* @__PURE__ */ jsx(AbsoluteCenter, { children: /* @__PURE__ */ jsxs(Stack, { spacing: 4, children: [
434
425
  /* @__PURE__ */ jsx(
435
426
  LinkButton,
@@ -438,7 +429,17 @@ const GameDemoPreview = ({ image, alt, href, imageFit = "contain", onPlayDemo })
438
429
  ...href ? { label: t2("action.playForReal"), href } : { label: t2("action.playForFree"), onClick: onPlayDemo }
439
430
  }
440
431
  ),
441
- !!href && /* @__PURE__ */ jsx(Button, { variant: "outline", colorScheme: "brand", size: { base: "sm", md: "md" }, onClick: onPlayDemo, children: t2("action.playForFree") })
432
+ !!href && /* @__PURE__ */ jsx(
433
+ Button,
434
+ {
435
+ variant: "solid",
436
+ colorScheme: "brand",
437
+ size: { base: "sm", md: "lg" },
438
+ _active: { transform: "scale(0.95)" },
439
+ onClick: onPlayDemo,
440
+ children: t2("action.playForFree")
441
+ }
442
+ )
442
443
  ] }) })
443
444
  ] });
444
445
  };
@@ -502,39 +503,34 @@ const GameInfoItem = ({ title, value }) => {
502
503
  /* @__PURE__ */ jsx(Text, { w: "50%", textTransform: "capitalize", children: value })
503
504
  ] });
504
505
  };
505
- const VISIBLE_LANGUAGE_NUMBER = 5;
506
+ const MAX_VISIBLE_LANGUAGE = 5;
506
507
  function stringifyHasFeature(value) {
507
508
  return t(`gameInfo:value.boolean.${value}`);
508
509
  }
509
510
  function stringifyVolatility(value) {
510
511
  return t(`gameInfo:value.volatility.${value}`);
511
512
  }
512
- function stringifyArray(array) {
513
+ function stringifyArray(array, max) {
514
+ const safeMax = typeof max === "number" ? Math.max(max, 0) : null;
515
+ if (safeMax && array.length > safeMax) {
516
+ return `${array.slice(0, safeMax).join(", ")}, +${array.length - safeMax}`;
517
+ }
513
518
  return array.join(", ");
514
519
  }
515
- function stringifyLanguageArray(languages) {
516
- return languages.length > VISIBLE_LANGUAGE_NUMBER ? `${stringifyArray(languages.slice(0, VISIBLE_LANGUAGE_NUMBER))}, +${languages.length - VISIBLE_LANGUAGE_NUMBER}` : stringifyArray(languages);
517
- }
518
- function getGameInfoItemValue(key, value, locale, currency) {
520
+ function getGameInfoItemValue(key, value, locale) {
519
521
  let formattedValue = "";
520
522
  if (typeof value !== "string") {
521
523
  if (key === GameCharacteristic.Rtp) {
522
524
  formattedValue = formatNumber(value, { percent: "real", precision: 3 });
523
525
  }
524
526
  if (key === GameCharacteristic.MinBet || key === GameCharacteristic.MaxBet || key === GameCharacteristic.MaxWin) {
525
- if (Array.isArray(currency)) {
526
- const [primary, ...secondaries] = currency || ["USD"];
527
- const primaryValue = formatNumber(value, { currency: primary });
528
- formattedValue = secondaries.length ? `${primaryValue} (${secondaries.map((currency2) => getCurrencySymbol(currency2, locale)).join(", ")})` : primaryValue;
529
- } else {
530
- formattedValue = formatNumber(value, { currency });
531
- }
527
+ formattedValue = formatNumber(value, { locale });
532
528
  }
533
529
  if (key === GameCharacteristic.Compatibility || key === GameCharacteristic.BonusFeatures) {
534
530
  formattedValue = stringifyArray(value);
535
531
  }
536
532
  if (key === GameCharacteristic.Languages) {
537
- formattedValue = stringifyLanguageArray(value);
533
+ formattedValue = stringifyArray(value, MAX_VISIBLE_LANGUAGE);
538
534
  }
539
535
  if (typeof value === "boolean") {
540
536
  formattedValue = stringifyHasFeature(value);
@@ -551,12 +547,15 @@ function getGameInfoItemValue(key, value, locale, currency) {
551
547
  }
552
548
  return formattedValue;
553
549
  }
554
- const GameInfo = ({ info }) => {
550
+ const DEFAULT_CURRENCY = "$, €, £";
551
+ function getGameInfoCurrency(currency, locale) {
552
+ const currencies = Array.isArray(currency) ? currency.map((code) => getCurrencySymbol(code, locale)) : [getCurrencySymbol(currency, locale)];
553
+ return stringifyArray(currencies);
554
+ }
555
+ const GameInfo = ({ info, currencies }) => {
555
556
  const { t: t2 } = useTranslation("gameInfo");
556
- const { localization } = useSiteContext();
557
557
  const { currentLocale } = usePageContext();
558
- const locale = currentLocale.code;
559
- const currency = localization.currency;
558
+ const currency = (currencies == null ? void 0 : currencies.length) ? getGameInfoCurrency(currencies, currentLocale.code) : DEFAULT_CURRENCY;
560
559
  return /* @__PURE__ */ jsx(
561
560
  Box,
562
561
  {
@@ -575,8 +574,8 @@ const GameInfo = ({ info }) => {
575
574
  return null;
576
575
  }
577
576
  const feature = itemKey;
578
- const value = getGameInfoItemValue(feature, itemValue, locale, currency);
579
- return /* @__PURE__ */ jsx(GameInfoItem, { title: t2(`feature.${feature}`), value }, itemKey);
577
+ const value = getGameInfoItemValue(feature, itemValue, currentLocale.code);
578
+ return /* @__PURE__ */ jsx(GameInfoItem, { title: t2(`feature.${feature}`, { currency }), value }, itemKey);
580
579
  })
581
580
  ] }, group)) })
582
581
  ] })
@@ -589,7 +588,7 @@ const HowTo = ({ steps, ...boxProps }) => {
589
588
  /* @__PURE__ */ jsx(Circle, { size: 12, bgColor, color: invertedColor, fontSize: "lg", fontWeight: "bold", children: String(index + 1) }),
590
589
  /* @__PURE__ */ jsxs(Stack, { flex: 1, children: [
591
590
  /* @__PURE__ */ jsx(Text, { fontSize: "lg", fontWeight: "bold", children: title }),
592
- typeof thumbnail === "string" ? /* @__PURE__ */ jsx(Image, { src: thumbnail, alt: title, aspectRatio: "16/9", objectFit: "cover" }) : thumbnail,
591
+ /* @__PURE__ */ jsx(Image, { src: thumbnail, alt: title, mode: "thumbnail", hasZoom: true }),
593
592
  /* @__PURE__ */ jsx(Text, { children: description })
594
593
  ] })
595
594
  ] }, index)) });
@@ -603,7 +602,7 @@ const Content = ({ children }) => {
603
602
  const Logo = () => {
604
603
  const { metadata } = useSiteContext();
605
604
  const { logo } = metadata;
606
- return /* @__PURE__ */ jsx(Box, { display: "flex", h: { base: 10, md: 14 }, overflow: "hidden", children: typeof logo === "string" ? /* @__PURE__ */ jsx(Image, { src: logo, alt: "Logo", objectFit: "contain" }) : logo });
605
+ return /* @__PURE__ */ jsx(Box, { display: "flex", h: { base: 10, md: 14 }, overflow: "hidden", children: /* @__PURE__ */ jsx(Image, { src: logo, alt: "Logo", objectFit: "contain" }) });
607
606
  };
608
607
  const Brand$1 = ({ brand }) => {
609
608
  return /* @__PURE__ */ jsxs(Box, { position: "relative", my: 2, py: 8, children: [
@@ -1070,7 +1069,7 @@ const Layout = ({ children }) => {
1070
1069
  ] });
1071
1070
  };
1072
1071
  const List = ({ items, bullet = "—", render, ...boxProps }) => {
1073
- return /* @__PURE__ */ jsx(List$1, { pl: 0, ml: 2, mb: 4, ...boxProps, children: items.map((item, index) => /* @__PURE__ */ jsxs(ListItem, { display: "flex", gap: 1, children: [
1072
+ return /* @__PURE__ */ jsx(List$1, { pl: 0, ml: 2, ...boxProps, children: items.map((item, index) => /* @__PURE__ */ jsxs(ListItem, { display: "flex", gap: 1, children: [
1074
1073
  /* @__PURE__ */ jsx(Box, { children: bullet }),
1075
1074
  render ? render(item) : item
1076
1075
  ] }, index)) });
@@ -1238,7 +1237,7 @@ const Tip = ({ tip, author = null, ...boxProps }) => {
1238
1237
  const ExternalImage = ({ image, component: ImageComponent, alt = "", ...imageProps }) => {
1239
1238
  var _a, _b;
1240
1239
  const imageData = (_b = (_a = image == null ? void 0 : image.localFile) == null ? void 0 : _a.childImageSharp) == null ? void 0 : _b.gatsbyImageData;
1241
- return imageData ? /* @__PURE__ */ jsx(ImageComponent, { image: imageData, alt, ...imageProps }) : /* @__PURE__ */ jsx(Fragment, {});
1240
+ return imageData ? /* @__PURE__ */ jsx(ImageComponent, { image: imageData, alt, ...imageProps }) : null;
1242
1241
  };
1243
1242
  const RichText = ({ content }) => {
1244
1243
  const components = useMDXComponents();
@@ -1247,6 +1246,12 @@ const RichText = ({ content }) => {
1247
1246
  function extractItemsFromJson(content) {
1248
1247
  return content.strapi_json_value;
1249
1248
  }
1249
+ function extractCurrencies(currencyList) {
1250
+ if (!currencyList) {
1251
+ return [];
1252
+ }
1253
+ return [...new Set(currencyList.items.map(({ code }) => code))];
1254
+ }
1250
1255
  const StrapiComponent = ({ type, props, imageComponent }) => {
1251
1256
  switch (type) {
1252
1257
  case "STRAPI__COMPONENT_CONTENT_FAQ":
@@ -1265,7 +1270,13 @@ const StrapiComponent = ({ type, props, imageComponent }) => {
1265
1270
  }
1266
1271
  );
1267
1272
  case "STRAPI__COMPONENT_CONTENT_GAME_INFO":
1268
- return /* @__PURE__ */ jsx(GameInfo, { info: { ...props } });
1273
+ return /* @__PURE__ */ jsx(
1274
+ GameInfo,
1275
+ {
1276
+ info: { general: props.general, features: props.features },
1277
+ currencies: extractCurrencies(props.currency)
1278
+ }
1279
+ );
1269
1280
  case "STRAPI__COMPONENT_CONTENT_HOW_TO":
1270
1281
  return /* @__PURE__ */ jsx(
1271
1282
  HowTo,
@@ -1280,15 +1291,14 @@ const StrapiComponent = ({ type, props, imageComponent }) => {
1280
1291
  }
1281
1292
  );
1282
1293
  case "STRAPI__COMPONENT_CONTENT_LIST":
1283
- return /* @__PURE__ */ jsx(List, { bullet: props.bullet, items: extractItemsFromJson(props.content) });
1294
+ return /* @__PURE__ */ jsx(List, { bullet: props.bullet, items: extractItemsFromJson(props.content), mb: 4 });
1284
1295
  case "STRAPI__COMPONENT_CONTENT_MEDIA":
1285
1296
  return /* @__PURE__ */ jsx(
1286
- ExternalImage,
1297
+ Image,
1287
1298
  {
1288
- component: imageComponent,
1289
- image: props.file,
1290
- alt: props.alternativeText,
1291
- style: { display: "inline-block", marginBottom: 16 }
1299
+ src: /* @__PURE__ */ jsx(ExternalImage, { component: imageComponent, image: props.file, alt: props.alternativeText }),
1300
+ mb: 4,
1301
+ hasZoom: true
1292
1302
  }
1293
1303
  );
1294
1304
  case "STRAPI__COMPONENT_CONTENT_PROS_CONS":
@@ -1,6 +1,6 @@
1
1
  import { useColorModeValue } from "@chakra-ui/react";
2
2
  import "./index-BJRvnR8Q.mjs";
3
- import "./index-CACDltm3.mjs";
3
+ import "./index-Bts2DBYS.mjs";
4
4
  import { L as LIGHT_THEME_COLOR, D as DARK_THEME_COLOR } from "./index-BRVKhbs6.mjs";
5
5
  function usePrimaryColors() {
6
6
  const color = useColorModeValue(LIGHT_THEME_COLOR, DARK_THEME_COLOR);
package/dist/index.cjs CHANGED
@@ -1,15 +1,15 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const index = require("./index-D0yXUsJz.js");
4
- const index$1 = require("./index-B9GEoC68.js");
3
+ const index = require("./index-BGMR4f6W.js");
4
+ const index$1 = require("./index-BltrZp3R.js");
5
5
  const index$2 = require("./index-WFgDSB1A.js");
6
- const index$3 = require("./index-BnmGE5_x.js");
6
+ const index$3 = require("./index-CAfBnNV6.js");
7
7
  const i18n = require("./i18n/index.cjs");
8
- const index$4 = require("./index-BIdYBT1G.js");
9
- const index$5 = require("./index-BHfpWNqh.js");
8
+ const index$4 = require("./index-BbxOP7UY.js");
9
+ const index$5 = require("./index-CJVr79Z2.js");
10
10
  const index$6 = require("./index-C6MG_f24.js");
11
11
  const index$7 = require("./index-CYr1ct1t.js");
12
- const index$8 = require("./index-D34TfBTR.js");
12
+ const index$8 = require("./index-BICcOaT7.js");
13
13
  const index$9 = require("./index-At00w6EN.js");
14
14
  const index$a = require("./index-CbuiYkSg.js");
15
15
  exports.Author = index.Author;
@@ -37,6 +37,7 @@ exports.StrapiContentRenderer = index.StrapiContentRenderer;
37
37
  exports.Table = index.Table;
38
38
  exports.Tabs = index.Tabs;
39
39
  exports.Tip = index.Tip;
40
+ exports.Image = index$1.Image;
40
41
  exports.Link = index$1.Link;
41
42
  exports.PageProvider = index$1.PageProvider;
42
43
  exports.SiteProvider = index$1.SiteProvider;
@@ -60,7 +61,6 @@ exports.getCurrencySymbol = index$8.getCurrencySymbol;
60
61
  exports.getCurrentMonth = index$8.getCurrentMonth;
61
62
  exports.getCurrentYear = index$8.getCurrentYear;
62
63
  exports.getSeededRandomComparator = index$8.getSeededRandomComparator;
63
- exports.parseNumber = index$8.parseNumber;
64
64
  exports.randomComparator = index$8.randomComparator;
65
65
  exports.round = index$8.round;
66
66
  exports.toFixedTwo = index$8.toFixedTwo;