@anywayseo/tools 5.5.0 → 5.7.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.
- package/dist/components/action-button/index.d.ts +5 -0
- package/dist/components/article-card/index.d.ts +7 -0
- package/dist/components/article-card-grid/index.d.ts +7 -0
- package/dist/components/article-info-card/index.d.ts +5 -0
- package/dist/components/base/article-meta/index.d.ts +7 -0
- package/dist/components/base/article-meta/item/index.d.ts +7 -0
- package/dist/components/base/copy-text/index.d.ts +6 -0
- package/dist/components/base/grid/index.d.ts +2 -4
- package/dist/components/base/h1/index.d.ts +4 -0
- package/dist/components/base/h2/index.d.ts +4 -0
- package/dist/components/base/h3/index.d.ts +4 -0
- package/dist/components/base/index.d.ts +11 -0
- package/dist/components/base/link/index.d.ts +5 -1
- package/dist/components/base/link/utils.d.ts +1 -0
- package/dist/components/base/ol/index.d.ts +4 -0
- package/dist/components/base/p/index.d.ts +4 -0
- package/dist/components/base/rating/index.d.ts +10 -0
- package/dist/components/base/ul/index.d.ts +4 -0
- package/dist/components/bonus-card-grid/index.d.ts +2 -4
- package/dist/components/casino-table/index.d.ts +8 -0
- package/dist/components/casino-table/row/casino-actions/index.d.ts +8 -0
- package/dist/components/casino-table/row/casino-bonus/index.d.ts +8 -0
- package/dist/components/casino-table/row/casino-info/index.d.ts +7 -0
- package/dist/components/casino-table/row/casino-info/item/index.d.ts +7 -0
- package/dist/components/casino-table/row/casino-info/utils.d.ts +2 -0
- package/dist/components/casino-table/row/casino-license/index.d.ts +5 -0
- package/dist/components/casino-table/row/casino-logo/index.d.ts +9 -0
- package/dist/components/casino-table/row/casino-name/index.d.ts +8 -0
- package/dist/components/casino-table/row/cell/index.d.ts +7 -0
- package/dist/components/casino-table/row/index.d.ts +7 -0
- package/dist/components/feature-card-grid/index.d.ts +2 -4
- package/dist/components/game-card-grid/index.d.ts +2 -4
- package/dist/components/game-demo/content/index.d.ts +1 -1
- package/dist/components/game-demo/index.d.ts +2 -2
- package/dist/components/game-demo/preview/alert/index.d.ts +3 -0
- package/dist/components/game-demo/preview/index.d.ts +2 -1
- package/dist/components/index.cjs +30 -9
- package/dist/components/index.d.ts +7 -3
- package/dist/components/index.mjs +44 -23
- package/dist/components/informer/index.d.ts +9 -0
- package/dist/components/informer/utils.d.ts +5 -0
- package/dist/components/{contact-form → pages/contacts/contact-form}/index.d.ts +1 -1
- package/dist/components/pages/contacts/index.d.ts +3 -0
- package/dist/components/pages/cookie-policy/index.d.ts +3 -0
- package/dist/components/pages/index.d.ts +5 -0
- package/dist/components/pages/privacy-policy/index.d.ts +6 -0
- package/dist/components/pages/terms-and-conditions/index.d.ts +6 -0
- package/dist/components/tip/index.d.ts +3 -0
- package/dist/hooks/index.cjs +2 -2
- package/dist/hooks/index.mjs +2 -2
- package/dist/i18n/index.cjs +10 -5
- package/dist/i18n/index.mjs +10 -5
- package/dist/i18n/resources/bg/index.d.ts +331 -0
- package/dist/i18n/resources/da/index.d.ts +331 -0
- package/dist/i18n/resources/de/index.d.ts +219 -0
- package/dist/i18n/resources/en/index.d.ts +219 -0
- package/dist/i18n/resources/fi/index.d.ts +331 -0
- package/dist/i18n/resources/fr/index.d.ts +219 -0
- package/dist/i18n/resources/it/index.d.ts +219 -0
- package/dist/i18n/resources/ka/index.d.ts +331 -0
- package/dist/i18n/resources/pt/index.d.ts +331 -0
- package/dist/i18n/resources/ru/index.d.ts +219 -0
- package/dist/index-B-k9oWE7.js +3552 -0
- package/dist/{index-D86anUPd.js → index-B71VkIfX.js} +426 -726
- package/dist/index-BEjKnOZA.mjs +28 -0
- package/dist/index-BTpEZIok.js +401 -0
- package/dist/index-BeJTy4iY.mjs +26 -0
- package/dist/index-BfITsKAr.js +25 -0
- package/dist/{index-BmaWfWLV.mjs → index-Bph7a3PR.mjs} +4 -0
- package/dist/{index-BCK4kr6V.mjs → index-C7z5qqm_.mjs} +3 -26
- package/dist/{index-tj12BA6U.mjs → index-CB0JfZMx.mjs} +1 -1
- package/dist/{index-cEaX-HbN.mjs → index-CEqTLcAR.mjs} +427 -727
- package/dist/index-CVN8I7r9.mjs +3553 -0
- package/dist/{index-CAfBnNV6.js → index-D15SAjJc.js} +1 -1
- package/dist/index-DDg_PkD2.js +27 -0
- package/dist/{index-BzbpMLDD.mjs → index-DHURrUMW.mjs} +1 -1
- package/dist/{index-At00w6EN.js → index-DgrIJs-a.js} +4 -0
- package/dist/index-FfZIjQy3.mjs +45 -0
- package/dist/index-Lln67Kfn.mjs +402 -0
- package/dist/{index-DZBLiQFh.js → index-QPgJfbrC.js} +52 -36
- package/dist/{index-BcFDxh8P.js → index-TxqSZvgf.js} +15 -27
- package/dist/{index-8_-KtKsW.mjs → index-ksqN4RPm.mjs} +50 -34
- package/dist/{index-WFgDSB1A.js → index-ma-iV7GU.js} +1 -1
- package/dist/{index-BICcOaT7.js → index-qR3kVjjs.js} +0 -23
- package/dist/index.cjs +73 -45
- package/dist/index.d.ts +1 -0
- package/dist/index.mjs +75 -47
- package/dist/{components/layout → layout}/footer/navigation/index.d.ts +1 -1
- package/dist/layout/header/locale-switcher/icons/brazil/index.d.ts +2 -0
- package/dist/layout/header/locale-switcher/icons/bulgaria/index.d.ts +2 -0
- package/dist/layout/header/locale-switcher/icons/denmark/index.d.ts +2 -0
- package/dist/layout/header/locale-switcher/icons/finland/index.d.ts +2 -0
- package/dist/layout/header/locale-switcher/icons/france/index.d.ts +2 -0
- package/dist/layout/header/locale-switcher/icons/georgia/index.d.ts +2 -0
- package/dist/layout/header/locale-switcher/icons/germany/index.d.ts +2 -0
- package/dist/layout/header/locale-switcher/icons/globe/index.d.ts +2 -0
- package/dist/layout/header/locale-switcher/icons/index.d.ts +10 -0
- package/dist/layout/header/locale-switcher/icons/italy/index.d.ts +2 -0
- package/dist/layout/header/locale-switcher/icons/russia/index.d.ts +2 -0
- package/dist/{components/layout → layout}/header/locale-switcher/index.d.ts +1 -1
- package/dist/{components/layout → layout}/header/locale-switcher/utils.d.ts +1 -1
- package/dist/{components/layout → layout}/header/navigation/desktop/index.d.ts +1 -1
- package/dist/{components/layout → layout}/header/navigation/desktop/nav-list/index.d.ts +1 -1
- package/dist/{components/layout → layout}/header/navigation/index.d.ts +1 -1
- package/dist/{components/layout → layout}/header/navigation/mobile/index.d.ts +1 -1
- package/dist/{components/layout → layout}/header/navigation/mobile/nav-list/index.d.ts +1 -1
- package/dist/{components/layout → layout}/header/navigation/nav-link/index.d.ts +1 -1
- package/dist/{components/layout → layout}/hero/index.d.ts +1 -1
- package/dist/layout/index.cjs +597 -0
- package/dist/layout/index.mjs +598 -0
- package/dist/providers/index.cjs +2 -2
- package/dist/providers/index.mjs +2 -2
- package/dist/providers/mdx-provider/types.d.ts +3 -1
- package/dist/providers/mdx-provider/utils.d.ts +1 -2
- package/dist/types/components/article-card/index.d.ts +9 -0
- package/dist/types/components/button/index.d.ts +1 -1
- package/dist/types/components/casino/index.d.ts +32 -0
- package/dist/types/components/casino-info/index.d.ts +12 -0
- package/dist/types/components/common/index.d.ts +1 -1
- package/dist/types/components/game-info/index.d.ts +4 -8
- package/dist/types/components/grid/index.d.ts +4 -0
- package/dist/types/components/index.d.ts +4 -0
- package/dist/types/components/informer/index.d.ts +5 -0
- package/dist/types/components/strapi-component/index.d.ts +1 -1
- package/dist/types/content/article/index.d.ts +12 -0
- package/dist/types/content/index.d.ts +1 -0
- package/dist/types/i18n/index.d.ts +2 -2
- package/dist/utils/index.cjs +15 -13
- package/dist/utils/index.mjs +10 -8
- package/dist/utils/navigation/index.d.ts +1 -0
- package/package.json +7 -1
- package/dist/components/layout/header/locale-switcher/icons/earth/index.d.ts +0 -2
- package/dist/components/layout/header/locale-switcher/icons/france/index.d.ts +0 -2
- package/dist/components/layout/header/locale-switcher/icons/germany/index.d.ts +0 -2
- package/dist/components/layout/header/locale-switcher/icons/globe/index.d.ts +0 -2
- package/dist/components/layout/header/locale-switcher/icons/index.d.ts +0 -6
- package/dist/components/layout/header/locale-switcher/icons/italy/index.d.ts +0 -2
- package/dist/components/layout/header/locale-switcher/icons/russia/index.d.ts +0 -2
- package/dist/index-Bts2DBYS.mjs +0 -637
- package/dist/index-CJVr79Z2.js +0 -636
- package/dist/index-C_FekfFC.mjs +0 -57
- /package/dist/components/{layout → base}/container/index.d.ts +0 -0
- /package/dist/components/{layout → base}/logo/index.d.ts +0 -0
- /package/dist/components/{not-found → pages/not-found}/index.d.ts +0 -0
- /package/dist/{components/layout → layout}/content/index.d.ts +0 -0
- /package/dist/{components/layout → layout}/footer/brand/index.d.ts +0 -0
- /package/dist/{components/layout → layout}/footer/copyright/index.d.ts +0 -0
- /package/dist/{components/layout → layout}/footer/disclaimer/index.d.ts +0 -0
- /package/dist/{components/layout → layout}/footer/extra/index.d.ts +0 -0
- /package/dist/{components/layout → layout}/footer/index.d.ts +0 -0
- /package/dist/{components/layout → layout}/header/brand/index.d.ts +0 -0
- /package/dist/{components/layout → layout}/header/index.d.ts +0 -0
- /package/dist/{components/layout → layout}/header/theme-toggler/index.d.ts +0 -0
- /package/dist/{components/layout → layout}/index.d.ts +0 -0
- /package/dist/{components/layout → layout}/main/index.d.ts +0 -0
- /package/dist/{components/layout → layout}/scroll-to-top/index.d.ts +0 -0
|
@@ -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-
|
|
4
|
+
require("./index-B-k9oWE7.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);
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
const jsxRuntime = require("react/jsx-runtime");
|
|
3
|
+
const react = require("@chakra-ui/react");
|
|
4
|
+
const Heading1 = ({ children, ...props }) => {
|
|
5
|
+
return /* @__PURE__ */ jsxRuntime.jsx(react.Heading, { as: "h1", size: "xl", mb: 4, ...props, children });
|
|
6
|
+
};
|
|
7
|
+
const Heading2 = ({ children, ...props }) => {
|
|
8
|
+
return /* @__PURE__ */ jsxRuntime.jsx(react.Heading, { as: "h2", size: "lg", mt: 6, mb: 4, ...props, children });
|
|
9
|
+
};
|
|
10
|
+
const Heading3 = ({ children, ...props }) => {
|
|
11
|
+
return /* @__PURE__ */ jsxRuntime.jsx(react.Heading, { as: "h3", size: "md", mt: 4, mb: 4, ...props, children });
|
|
12
|
+
};
|
|
13
|
+
const Ordered = ({ children, ...props }) => {
|
|
14
|
+
return /* @__PURE__ */ jsxRuntime.jsx(react.OrderedList, { mb: 4, ...props, children });
|
|
15
|
+
};
|
|
16
|
+
const Paragraph = ({ children, ...props }) => {
|
|
17
|
+
return /* @__PURE__ */ jsxRuntime.jsx(react.Text, { mb: 4, ...props, children });
|
|
18
|
+
};
|
|
19
|
+
const Unordered = ({ children, ...props }) => {
|
|
20
|
+
return /* @__PURE__ */ jsxRuntime.jsx(react.UnorderedList, { mb: 4, ...props, children });
|
|
21
|
+
};
|
|
22
|
+
exports.Heading1 = Heading1;
|
|
23
|
+
exports.Heading2 = Heading2;
|
|
24
|
+
exports.Heading3 = Heading3;
|
|
25
|
+
exports.Ordered = Ordered;
|
|
26
|
+
exports.Paragraph = Paragraph;
|
|
27
|
+
exports.Unordered = Unordered;
|
|
@@ -7,7 +7,7 @@ function useLocalization({ location, defaultLocale, locales }) {
|
|
|
7
7
|
useEffect(() => {
|
|
8
8
|
const cleanPath = path.replace(/^\/+|\/+$/g, "");
|
|
9
9
|
const maybeLocaleCode = cleanPath.split("/")[0];
|
|
10
|
-
const maybeLocale = locales.find(({ code }) => code === maybeLocaleCode);
|
|
10
|
+
const maybeLocale = locales.find(({ code }) => code.toLowerCase() === maybeLocaleCode.toLowerCase());
|
|
11
11
|
const locale = maybeLocale ? maybeLocale : defaultLocale;
|
|
12
12
|
if (locale.code !== currentLocale.code) {
|
|
13
13
|
setCurrentLocale(locale);
|
|
@@ -5,5 +5,9 @@ function buildPath(slug, parentSlug) {
|
|
|
5
5
|
function isRelativePath(path = "") {
|
|
6
6
|
return path.startsWith("/");
|
|
7
7
|
}
|
|
8
|
+
function isAbsolutePath(path = "") {
|
|
9
|
+
return /^[a-zA-Z][a-zA-Z\d+\-.]*:/.test(path);
|
|
10
|
+
}
|
|
8
11
|
exports.buildPath = buildPath;
|
|
12
|
+
exports.isAbsolutePath = isAbsolutePath;
|
|
9
13
|
exports.isRelativePath = isRelativePath;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import { MDXProvider } from "@mdx-js/react";
|
|
3
|
+
import "react-i18next";
|
|
4
|
+
import "@chakra-ui/react";
|
|
5
|
+
import { I as Image, L as Link } from "./index-ksqN4RPm.mjs";
|
|
6
|
+
import "./index-BJRvnR8Q.mjs";
|
|
7
|
+
import "./index-CVN8I7r9.mjs";
|
|
8
|
+
import "react";
|
|
9
|
+
import "@chakra-ui/icons";
|
|
10
|
+
import { P as Paragraph, U as Unordered, O as Ordered, b as Heading3, a as Heading2, H as Heading1 } from "./index-BEjKnOZA.mjs";
|
|
11
|
+
function omitProps(props, omittedKeys) {
|
|
12
|
+
const result = { ...props };
|
|
13
|
+
omittedKeys.forEach((key) => {
|
|
14
|
+
if (key in result) {
|
|
15
|
+
delete result[key];
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
return result;
|
|
19
|
+
}
|
|
20
|
+
function preprocessProps(callback) {
|
|
21
|
+
const omittedKeys = ["node"];
|
|
22
|
+
return (props) => callback(omitProps(props, omittedKeys));
|
|
23
|
+
}
|
|
24
|
+
function renderLink({ href, ...props }) {
|
|
25
|
+
return /* @__PURE__ */ jsx(Link, { to: href, color: "brand.400", ...props });
|
|
26
|
+
}
|
|
27
|
+
function renderImage(props) {
|
|
28
|
+
return /* @__PURE__ */ jsx(Image, { ...props, mt: 4, mb: 4, hasZoom: true });
|
|
29
|
+
}
|
|
30
|
+
const components = {
|
|
31
|
+
h1: preprocessProps((props) => /* @__PURE__ */ jsx(Heading1, { ...props })),
|
|
32
|
+
h2: preprocessProps((props) => /* @__PURE__ */ jsx(Heading2, { ...props })),
|
|
33
|
+
h3: preprocessProps((props) => /* @__PURE__ */ jsx(Heading3, { ...props })),
|
|
34
|
+
ol: preprocessProps((props) => /* @__PURE__ */ jsx(Ordered, { ...props })),
|
|
35
|
+
ul: preprocessProps((props) => /* @__PURE__ */ jsx(Unordered, { ...props })),
|
|
36
|
+
p: preprocessProps((props) => /* @__PURE__ */ jsx(Paragraph, { ...props })),
|
|
37
|
+
a: preprocessProps((props) => renderLink(props)),
|
|
38
|
+
img: preprocessProps((props) => renderImage(props))
|
|
39
|
+
};
|
|
40
|
+
const MdxProvider = ({ children }) => {
|
|
41
|
+
return /* @__PURE__ */ jsx(MDXProvider, { components, children });
|
|
42
|
+
};
|
|
43
|
+
export {
|
|
44
|
+
MdxProvider as M
|
|
45
|
+
};
|
|
@@ -0,0 +1,402 @@
|
|
|
1
|
+
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
+
import { Flex, Container as Container$1, useColorModeValue, useToast, useClipboard, Text, IconButton, Button, Box, Stack, Card, Badge, Td, Tr, Table, Thead, Th, Tbody } from "@chakra-ui/react";
|
|
3
|
+
import { L as Link, a as useSiteContext, I as Image, u as usePageContext } from "./index-ksqN4RPm.mjs";
|
|
4
|
+
import "@mdx-js/react";
|
|
5
|
+
import { useTranslation } from "react-i18next";
|
|
6
|
+
import { A as Animation } from "./index-BJRvnR8Q.mjs";
|
|
7
|
+
import { a as CasinoCharacteristic, C as CasinoTableColumn } from "./index-CVN8I7r9.mjs";
|
|
8
|
+
import "react";
|
|
9
|
+
import { CheckIcon, CopyIcon, StarIcon } from "@chakra-ui/icons";
|
|
10
|
+
import "react-medium-image-zoom";
|
|
11
|
+
import { u as usePrimaryColors } from "./index-CB0JfZMx.mjs";
|
|
12
|
+
import { b as formatNumber } from "./index-C7z5qqm_.mjs";
|
|
13
|
+
const FacebookIcon = (props) => {
|
|
14
|
+
return /* @__PURE__ */ jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", "aria-label": "Facebook", ...props, children: [
|
|
15
|
+
/* @__PURE__ */ jsx("rect", { x: "1", y: "1", width: "22", height: "22", rx: "5", fill: "none", stroke: "currentColor", strokeWidth: "2" }),
|
|
16
|
+
/* @__PURE__ */ jsx(
|
|
17
|
+
"path",
|
|
18
|
+
{
|
|
19
|
+
d: "M13.5 8h2V6h-2c-2.2 0-3.5 1.3-3.5 3.5V11H8v2h2v5h2v-5h2l.5-2h-2v-1.3c0-.5.2-.7 1-.7Z",
|
|
20
|
+
fill: "currentColor"
|
|
21
|
+
}
|
|
22
|
+
)
|
|
23
|
+
] });
|
|
24
|
+
};
|
|
25
|
+
const InstagramIcon = (props) => {
|
|
26
|
+
return /* @__PURE__ */ jsxs(
|
|
27
|
+
"svg",
|
|
28
|
+
{
|
|
29
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
30
|
+
width: "24",
|
|
31
|
+
height: "24",
|
|
32
|
+
viewBox: "0 0 24 24",
|
|
33
|
+
"aria-label": "Instagram",
|
|
34
|
+
...props,
|
|
35
|
+
children: [
|
|
36
|
+
/* @__PURE__ */ jsx("rect", { x: "1", y: "1", width: "22", height: "22", rx: "5", fill: "none", stroke: "currentColor", strokeWidth: "2" }),
|
|
37
|
+
/* @__PURE__ */ jsx("circle", { cx: "12", cy: "12", r: "4", fill: "none", stroke: "currentColor", strokeWidth: "2" }),
|
|
38
|
+
/* @__PURE__ */ jsx("circle", { cx: "17", cy: "7", r: "1.25", fill: "currentColor" })
|
|
39
|
+
]
|
|
40
|
+
}
|
|
41
|
+
);
|
|
42
|
+
};
|
|
43
|
+
const PinterestIcon = (props) => {
|
|
44
|
+
return /* @__PURE__ */ jsx(
|
|
45
|
+
"svg",
|
|
46
|
+
{
|
|
47
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
48
|
+
width: "24",
|
|
49
|
+
height: "24",
|
|
50
|
+
viewBox: "0 0 24 24",
|
|
51
|
+
"aria-label": "Pinterest",
|
|
52
|
+
...props,
|
|
53
|
+
children: /* @__PURE__ */ jsx(
|
|
54
|
+
"path",
|
|
55
|
+
{
|
|
56
|
+
fill: "currentColor",
|
|
57
|
+
d: "M12 0C5.373 0 0 5.373 0 12c0 4.99 3.657 9.128 8.438 10.122-.117-.858-.222-2.178.047-3.116.242-.83 1.557-5.288 1.557-5.288s-.396-.792-.396-1.963c0-1.84 1.067-3.215 2.395-3.215 1.13 0 1.675.848 1.675 1.866 0 1.138-.724 2.842-1.097 4.421-.312 1.319.663 2.395 1.965 2.395 2.358 0 3.947-3.032 3.947-6.617 0-2.727-1.84-4.769-5.178-4.769-3.774 0-6.134 2.822-6.134 5.97 0 1.086.322 1.852.827 2.443.232.274.264.384.18.698-.06.23-.197.786-.256 1.007-.084.322-.34.437-.628.318-1.75-.714-2.564-2.63-2.564-4.785 0-3.555 2.998-7.817 8.946-7.817 4.782 0 7.923 3.454 7.923 7.168 0 4.924-2.74 8.6-6.781 8.6-1.356 0-2.63-.73-3.066-1.565l-.833 3.173c-.301 1.147-1.118 2.582-1.667 3.455C9.708 23.812 10.828 24 12 24c6.627 0 12-5.373 12-12S18.627 0 12 0z"
|
|
58
|
+
}
|
|
59
|
+
)
|
|
60
|
+
}
|
|
61
|
+
);
|
|
62
|
+
};
|
|
63
|
+
const XcomIcon = (props) => {
|
|
64
|
+
return /* @__PURE__ */ jsx("svg", { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", "aria-label": "X", ...props, children: /* @__PURE__ */ jsx(
|
|
65
|
+
"path",
|
|
66
|
+
{
|
|
67
|
+
fill: "currentColor",
|
|
68
|
+
d: "M18.244 2H21l-6.57 7.498L22 22h-5.657l-4.403-5.808L6.06 22H3.302l7.02-8.006L2 2h5.822l3.983 5.293L18.244 2zM16.97 20h1.9L8.153 4h-1.9L16.97 20z"
|
|
69
|
+
}
|
|
70
|
+
) });
|
|
71
|
+
};
|
|
72
|
+
const YoutubeIcon = (props) => {
|
|
73
|
+
return /* @__PURE__ */ jsx("svg", { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", "aria-label": "YouTube", ...props, children: /* @__PURE__ */ jsx(
|
|
74
|
+
"path",
|
|
75
|
+
{
|
|
76
|
+
fill: "currentColor",
|
|
77
|
+
d: "M23.498 6.186a2.974 2.974 0 0 0-2.095-2.107C19.505 3.5 12 3.5 12 3.5s-7.505 0-9.403.579A2.974 2.974 0 0 0 .502 6.186C0 8.09 0 12 0 12s0 3.91.502 5.814a2.974 2.974 0 0 0 2.095 2.107C4.495 20.5 12 20.5 12 20.5s7.505 0 9.403-.579a2.974 2.974 0 0 0 2.095-2.107C24 15.91 24 12 24 12s0-3.91-.502-5.814zM9.75 15.02V8.98L15.5 12l-5.75 3.02z"
|
|
78
|
+
}
|
|
79
|
+
) });
|
|
80
|
+
};
|
|
81
|
+
const SocialNetworkMap = {
|
|
82
|
+
facebook: FacebookIcon,
|
|
83
|
+
instagram: InstagramIcon,
|
|
84
|
+
pinterest: PinterestIcon,
|
|
85
|
+
x: XcomIcon,
|
|
86
|
+
youtube: YoutubeIcon
|
|
87
|
+
};
|
|
88
|
+
const SocialNetwork = ({ kind, url }) => {
|
|
89
|
+
const Icon = SocialNetworkMap[kind];
|
|
90
|
+
return /* @__PURE__ */ jsx(Link, { to: url, children: /* @__PURE__ */ jsx(Icon, {}) });
|
|
91
|
+
};
|
|
92
|
+
const SocialNetworks = ({ socialNetworks, ...flexProps }) => {
|
|
93
|
+
const uniqueSocialNetworks = [...new Map(socialNetworks.map((item) => [item.kind, item])).values()];
|
|
94
|
+
return /* @__PURE__ */ jsx(Flex, { gap: 2, ...flexProps, children: uniqueSocialNetworks.map((socialNetwork) => /* @__PURE__ */ jsx(SocialNetwork, { ...socialNetwork }, socialNetwork.kind)) });
|
|
95
|
+
};
|
|
96
|
+
const Container = ({ children }) => {
|
|
97
|
+
return /* @__PURE__ */ jsx(Container$1, { maxW: "container.xl", children });
|
|
98
|
+
};
|
|
99
|
+
const CopyText = ({ value }) => {
|
|
100
|
+
const backgroundColor = useColorModeValue("gray.200", "gray.700");
|
|
101
|
+
const toast = useToast();
|
|
102
|
+
const { t } = useTranslation("copyText");
|
|
103
|
+
const { hasCopied, onCopy } = useClipboard(value);
|
|
104
|
+
function handleCopy() {
|
|
105
|
+
onCopy();
|
|
106
|
+
toast({ title: t("title"), status: "success", duration: 2e3, isClosable: true });
|
|
107
|
+
}
|
|
108
|
+
return /* @__PURE__ */ jsxs(Flex, { align: "center", gap: 2, backgroundColor, ps: 4, rounded: "lg", children: [
|
|
109
|
+
/* @__PURE__ */ jsx(Text, { fontFamily: "mono", children: value }),
|
|
110
|
+
/* @__PURE__ */ jsx(
|
|
111
|
+
IconButton,
|
|
112
|
+
{
|
|
113
|
+
icon: hasCopied ? /* @__PURE__ */ jsx(CheckIcon, {}) : /* @__PURE__ */ jsx(CopyIcon, {}),
|
|
114
|
+
"aria-label": "Copy to clipboard",
|
|
115
|
+
size: "sm",
|
|
116
|
+
variant: "ghost",
|
|
117
|
+
colorScheme: hasCopied ? "green" : "gray",
|
|
118
|
+
onClick: handleCopy
|
|
119
|
+
}
|
|
120
|
+
)
|
|
121
|
+
] });
|
|
122
|
+
};
|
|
123
|
+
const LinkButton = ({
|
|
124
|
+
label,
|
|
125
|
+
href,
|
|
126
|
+
linkType = "redirect",
|
|
127
|
+
size = "auto",
|
|
128
|
+
width = "auto",
|
|
129
|
+
textTransform,
|
|
130
|
+
textDecoration,
|
|
131
|
+
animation,
|
|
132
|
+
onClick,
|
|
133
|
+
...boxProps
|
|
134
|
+
}) => {
|
|
135
|
+
var _a;
|
|
136
|
+
const { config } = useSiteContext();
|
|
137
|
+
const { color, invertedColor } = usePrimaryColors();
|
|
138
|
+
const isInvertedColor = (_a = config == null ? void 0 : config.theme) == null ? void 0 : _a.isInvertedColor;
|
|
139
|
+
return /* @__PURE__ */ jsx(
|
|
140
|
+
Button,
|
|
141
|
+
{
|
|
142
|
+
w: width,
|
|
143
|
+
size: size === "auto" ? { base: "sm", md: "lg" } : size,
|
|
144
|
+
bg: "brand.500",
|
|
145
|
+
color: isInvertedColor ? invertedColor : color,
|
|
146
|
+
animation: animation ? Animation[animation.type](animation.params) : void 0,
|
|
147
|
+
textTransform,
|
|
148
|
+
_hover: { textDecoration, bg: "brand.200" },
|
|
149
|
+
_active: { transform: "scale(0.95)" },
|
|
150
|
+
onClick,
|
|
151
|
+
...boxProps,
|
|
152
|
+
...href && {
|
|
153
|
+
as: Link,
|
|
154
|
+
to: href,
|
|
155
|
+
isRedirectLink: linkType === "redirect"
|
|
156
|
+
},
|
|
157
|
+
children: label
|
|
158
|
+
}
|
|
159
|
+
);
|
|
160
|
+
};
|
|
161
|
+
const Logo = () => {
|
|
162
|
+
const { metadata } = useSiteContext();
|
|
163
|
+
const { logo } = metadata;
|
|
164
|
+
return /* @__PURE__ */ jsx(Box, { display: "flex", h: { base: 10, md: 14 }, overflow: "hidden", children: /* @__PURE__ */ jsx(Image, { src: logo, alt: "Logo", objectFit: "contain" }) });
|
|
165
|
+
};
|
|
166
|
+
const StarSizeMap = {
|
|
167
|
+
sm: 12,
|
|
168
|
+
md: 16,
|
|
169
|
+
lg: 20
|
|
170
|
+
};
|
|
171
|
+
const FontSizeMap = {
|
|
172
|
+
sm: "xs",
|
|
173
|
+
md: "sm",
|
|
174
|
+
lg: "md"
|
|
175
|
+
};
|
|
176
|
+
const Rating = ({ value = 0, max = 5, size = "md", hasLabel }) => {
|
|
177
|
+
const current = Math.round(Math.min(value, max));
|
|
178
|
+
const stars = /* @__PURE__ */ jsx(Flex, { gap: 1, children: Array.from({ length: max }, (_, i) => {
|
|
179
|
+
const index = i + 1;
|
|
180
|
+
const isActive = index <= current;
|
|
181
|
+
return /* @__PURE__ */ jsx(
|
|
182
|
+
StarIcon,
|
|
183
|
+
{
|
|
184
|
+
boxSize: StarSizeMap[size],
|
|
185
|
+
color: isActive ? "var(--chakra-colors-yellow-400)" : "gray"
|
|
186
|
+
},
|
|
187
|
+
index
|
|
188
|
+
);
|
|
189
|
+
}) });
|
|
190
|
+
return hasLabel ? /* @__PURE__ */ jsxs(Stack, { spacing: 1, align: "center", children: [
|
|
191
|
+
stars,
|
|
192
|
+
/* @__PURE__ */ jsxs(Text, { fontSize: FontSizeMap[size], children: [
|
|
193
|
+
current,
|
|
194
|
+
" / ",
|
|
195
|
+
max
|
|
196
|
+
] })
|
|
197
|
+
] }) : stars;
|
|
198
|
+
};
|
|
199
|
+
const CasinoActions = ({ referralUrl, reviewUrl }) => {
|
|
200
|
+
const { t } = useTranslation("casinoTable");
|
|
201
|
+
const referralLinkLabel = t("row.actions.getBonus");
|
|
202
|
+
const reviewLinkLabel = t("row.actions.readReview");
|
|
203
|
+
return /* @__PURE__ */ jsxs(Stack, { children: [
|
|
204
|
+
!!referralUrl && /* @__PURE__ */ jsx(
|
|
205
|
+
LinkButton,
|
|
206
|
+
{
|
|
207
|
+
href: referralUrl,
|
|
208
|
+
label: referralLinkLabel,
|
|
209
|
+
textDecoration: "none",
|
|
210
|
+
size: { base: "sm", md: "md", lg: "lg" }
|
|
211
|
+
}
|
|
212
|
+
),
|
|
213
|
+
!!reviewUrl && /* @__PURE__ */ jsx(Link, { to: reviewUrl, fontSize: "sm", children: reviewLinkLabel })
|
|
214
|
+
] });
|
|
215
|
+
};
|
|
216
|
+
const CasinoBonus = ({ bonus, promoCode }) => {
|
|
217
|
+
return /* @__PURE__ */ jsxs(Stack, { gap: 3, align: "center", children: [
|
|
218
|
+
/* @__PURE__ */ jsx(Text, { fontSize: "xl", children: bonus }),
|
|
219
|
+
!!promoCode && /* @__PURE__ */ jsx(CopyText, { value: promoCode })
|
|
220
|
+
] });
|
|
221
|
+
};
|
|
222
|
+
const CasinoInfoItem = ({ label, value }) => {
|
|
223
|
+
const color = useColorModeValue("gray.500", "gray.300");
|
|
224
|
+
return /* @__PURE__ */ jsxs(Text, { display: "inline-flex", justifyContent: "space-between", gap: 2, w: "full", textAlign: "end", children: [
|
|
225
|
+
/* @__PURE__ */ jsxs(Text, { as: "span", color, fontSize: "xs", fontWeight: "semibold", textAlign: "start", me: 1, children: [
|
|
226
|
+
label,
|
|
227
|
+
":"
|
|
228
|
+
] }),
|
|
229
|
+
value
|
|
230
|
+
] });
|
|
231
|
+
};
|
|
232
|
+
function getCasinoInfoItemValue(key, value, locale) {
|
|
233
|
+
let formattedValue = "";
|
|
234
|
+
if (typeof value !== "string") {
|
|
235
|
+
if (key === CasinoCharacteristic.Rtp) {
|
|
236
|
+
formattedValue = formatNumber(value, { percent: "real", precision: 3 });
|
|
237
|
+
}
|
|
238
|
+
if (key === CasinoCharacteristic.MidDeposit) {
|
|
239
|
+
formattedValue = formatNumber(value, { locale });
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
if (!formattedValue) {
|
|
243
|
+
formattedValue = value.toLocaleString();
|
|
244
|
+
}
|
|
245
|
+
return formattedValue;
|
|
246
|
+
}
|
|
247
|
+
const CasinoInfo = ({ info }) => {
|
|
248
|
+
const { currentLocale } = usePageContext();
|
|
249
|
+
const { t } = useTranslation("casinoInfo");
|
|
250
|
+
return /* @__PURE__ */ jsx(Card, { py: 1, px: 2, w: "100%", children: /* @__PURE__ */ jsx(Stack, { gap: 1, align: "start", children: Object.entries(info).map(([itemKey, itemValue]) => {
|
|
251
|
+
if (!itemValue) {
|
|
252
|
+
return null;
|
|
253
|
+
}
|
|
254
|
+
const label = itemKey;
|
|
255
|
+
const value = getCasinoInfoItemValue(label, itemValue, currentLocale.code);
|
|
256
|
+
return /* @__PURE__ */ jsx(CasinoInfoItem, { label: t(`feature.${label}`), value }, label);
|
|
257
|
+
}) }) });
|
|
258
|
+
};
|
|
259
|
+
const CasinoLicense = ({ name, image }) => {
|
|
260
|
+
return /* @__PURE__ */ jsx(Flex, { align: "top", justify: "center", w: "full", h: "full", children: /* @__PURE__ */ jsx(Image, { src: image, alt: name, title: name, w: { base: "16", md: "12" }, rounded: "lg" }) });
|
|
261
|
+
};
|
|
262
|
+
const CasinoLogo = ({ name, image, isBestChoice }) => {
|
|
263
|
+
const { t } = useTranslation("casinoTable");
|
|
264
|
+
const background = useColorModeValue("gray.100", "gray.700");
|
|
265
|
+
return /* @__PURE__ */ jsxs(Box, { position: "relative", display: "inline-block", w: "100%", children: [
|
|
266
|
+
/* @__PURE__ */ jsx(Image, { src: image, alt: name, title: name, borderRadius: "md", w: "100%", objectFit: "cover" }),
|
|
267
|
+
isBestChoice && /* @__PURE__ */ jsx(
|
|
268
|
+
Badge,
|
|
269
|
+
{
|
|
270
|
+
position: "absolute",
|
|
271
|
+
top: 1,
|
|
272
|
+
left: 1,
|
|
273
|
+
fontSize: "2xs",
|
|
274
|
+
px: 1,
|
|
275
|
+
borderRadius: "md",
|
|
276
|
+
shadow: "md",
|
|
277
|
+
colorScheme: "brand",
|
|
278
|
+
background,
|
|
279
|
+
children: t("row.logo.bestChoiceBadge")
|
|
280
|
+
}
|
|
281
|
+
)
|
|
282
|
+
] });
|
|
283
|
+
};
|
|
284
|
+
const CasinoName = ({ name, rating }) => {
|
|
285
|
+
return /* @__PURE__ */ jsxs(Stack, { gap: 3, w: "full", children: [
|
|
286
|
+
/* @__PURE__ */ jsx(Text, { children: name }),
|
|
287
|
+
/* @__PURE__ */ jsx(Rating, { value: rating, size: "sm", hasLabel: true })
|
|
288
|
+
] });
|
|
289
|
+
};
|
|
290
|
+
const Cell = ({ children, borderColor, ...props }) => {
|
|
291
|
+
return /* @__PURE__ */ jsx(
|
|
292
|
+
Td,
|
|
293
|
+
{
|
|
294
|
+
textAlign: "center",
|
|
295
|
+
p: 2,
|
|
296
|
+
borderBottom: { base: "none", md: "1px solid" },
|
|
297
|
+
borderBottomColor: { base: "none", md: borderColor },
|
|
298
|
+
...props,
|
|
299
|
+
children
|
|
300
|
+
}
|
|
301
|
+
);
|
|
302
|
+
};
|
|
303
|
+
const CasinoTableRow = ({ casino }) => {
|
|
304
|
+
const { id, image, name, rating, bonus, promoCode, license, info, referralUrl, reviewUrl } = casino;
|
|
305
|
+
const borderColor = useColorModeValue("gray.200", "whiteAlpha.300");
|
|
306
|
+
return /* @__PURE__ */ jsxs(
|
|
307
|
+
Tr,
|
|
308
|
+
{
|
|
309
|
+
display: { base: "inline-block", md: "table-row" },
|
|
310
|
+
w: { base: "100%", md: "auto" },
|
|
311
|
+
p: { base: 4, md: 0 },
|
|
312
|
+
mb: { base: 4, md: 0 },
|
|
313
|
+
border: { base: "1px solid", md: "none" },
|
|
314
|
+
borderColor,
|
|
315
|
+
borderRadius: "xl",
|
|
316
|
+
overflow: "hidden",
|
|
317
|
+
children: [
|
|
318
|
+
/* @__PURE__ */ jsx(Cell, { display: { base: "none", md: "table-cell" }, borderColor, children: id }),
|
|
319
|
+
/* @__PURE__ */ jsx(
|
|
320
|
+
Cell,
|
|
321
|
+
{
|
|
322
|
+
display: { base: "block", md: "table-cell" },
|
|
323
|
+
w: { base: "full", md: 200 },
|
|
324
|
+
minW: 100,
|
|
325
|
+
borderColor,
|
|
326
|
+
children: /* @__PURE__ */ jsx(CasinoLogo, { name, image, isBestChoice: id === "1" })
|
|
327
|
+
}
|
|
328
|
+
),
|
|
329
|
+
/* @__PURE__ */ jsx(
|
|
330
|
+
Cell,
|
|
331
|
+
{
|
|
332
|
+
display: { base: "inline-flex", md: "table-cell" },
|
|
333
|
+
w: { base: license ? "50%" : "full", md: "auto" },
|
|
334
|
+
borderColor,
|
|
335
|
+
children: /* @__PURE__ */ jsx(CasinoName, { name, rating })
|
|
336
|
+
}
|
|
337
|
+
),
|
|
338
|
+
/* @__PURE__ */ jsx(
|
|
339
|
+
Cell,
|
|
340
|
+
{
|
|
341
|
+
display: { base: license ? "inline-flex" : "none", md: "table-cell" },
|
|
342
|
+
w: { base: "50%", md: "16" },
|
|
343
|
+
borderColor,
|
|
344
|
+
children: license ? /* @__PURE__ */ jsx(CasinoLicense, { ...license }) : "—"
|
|
345
|
+
}
|
|
346
|
+
),
|
|
347
|
+
/* @__PURE__ */ jsx(
|
|
348
|
+
Cell,
|
|
349
|
+
{
|
|
350
|
+
display: { base: "block", sm: info ? "inline-flex" : "block", md: "table-cell" },
|
|
351
|
+
w: { base: "full", sm: info ? "60%" : "full", md: "auto" },
|
|
352
|
+
borderColor,
|
|
353
|
+
children: /* @__PURE__ */ jsx(CasinoBonus, { bonus, promoCode })
|
|
354
|
+
}
|
|
355
|
+
),
|
|
356
|
+
/* @__PURE__ */ jsx(
|
|
357
|
+
Cell,
|
|
358
|
+
{
|
|
359
|
+
display: { base: info ? "block" : "none", sm: info ? "inline-flex" : "none", md: "table-cell" },
|
|
360
|
+
w: { base: "full", sm: "40%", md: "40" },
|
|
361
|
+
borderColor,
|
|
362
|
+
children: info ? /* @__PURE__ */ jsx(CasinoInfo, { info }) : "—"
|
|
363
|
+
}
|
|
364
|
+
),
|
|
365
|
+
/* @__PURE__ */ jsx(Cell, { display: { base: "block", md: "table-cell" }, borderColor, children: /* @__PURE__ */ jsx(CasinoActions, { referralUrl, reviewUrl }) })
|
|
366
|
+
]
|
|
367
|
+
}
|
|
368
|
+
);
|
|
369
|
+
};
|
|
370
|
+
const columns = [
|
|
371
|
+
CasinoTableColumn.ID,
|
|
372
|
+
CasinoTableColumn.Logo,
|
|
373
|
+
CasinoTableColumn.Name,
|
|
374
|
+
CasinoTableColumn.License,
|
|
375
|
+
CasinoTableColumn.Bonus,
|
|
376
|
+
CasinoTableColumn.Info,
|
|
377
|
+
CasinoTableColumn.Actions
|
|
378
|
+
];
|
|
379
|
+
const CasinoTable = ({ casinos, showHeader = false }) => {
|
|
380
|
+
const { t } = useTranslation("casinoTable");
|
|
381
|
+
return /* @__PURE__ */ jsxs(Table, { variant: "simple", size: "md", children: [
|
|
382
|
+
/* @__PURE__ */ jsx(
|
|
383
|
+
Thead,
|
|
384
|
+
{
|
|
385
|
+
position: { base: "absolute", md: showHeader ? "static" : "absolute" },
|
|
386
|
+
opacity: { base: 0, md: showHeader ? "initial" : 0 },
|
|
387
|
+
children: /* @__PURE__ */ jsx(Tr, { children: columns.map((column) => /* @__PURE__ */ jsx(Th, { textAlign: "center", p: 2, children: t(`column.${column}`) }, column)) })
|
|
388
|
+
}
|
|
389
|
+
),
|
|
390
|
+
/* @__PURE__ */ jsx(Tbody, { children: casinos.map(({ id, ...casino }, index) => /* @__PURE__ */ jsx(CasinoTableRow, { casino: { id: String(index + 1), ...casino } }, id)) })
|
|
391
|
+
] });
|
|
392
|
+
};
|
|
393
|
+
export {
|
|
394
|
+
CasinoTable as C,
|
|
395
|
+
LinkButton as L,
|
|
396
|
+
Rating as R,
|
|
397
|
+
SocialNetwork as S,
|
|
398
|
+
Container as a,
|
|
399
|
+
CopyText as b,
|
|
400
|
+
Logo as c,
|
|
401
|
+
SocialNetworks as d
|
|
402
|
+
};
|
|
@@ -1,15 +1,42 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
const jsxRuntime = require("react/jsx-runtime");
|
|
3
|
-
const react = require("@chakra-ui/react");
|
|
3
|
+
const react$1 = require("@chakra-ui/react");
|
|
4
4
|
const Zoom = require("react-medium-image-zoom");
|
|
5
|
-
const react
|
|
5
|
+
const react = require("react");
|
|
6
6
|
const gatsby = require("gatsby");
|
|
7
7
|
require("@mdx-js/react");
|
|
8
8
|
require("react-i18next");
|
|
9
9
|
require("./index-C6MG_f24.js");
|
|
10
|
-
require("./index-
|
|
11
|
-
|
|
12
|
-
const index
|
|
10
|
+
require("./index-B-k9oWE7.js");
|
|
11
|
+
require("@chakra-ui/icons");
|
|
12
|
+
const index = require("./index-ma-iV7GU.js");
|
|
13
|
+
const index$1 = require("./index-DgrIJs-a.js");
|
|
14
|
+
const SiteContext = react.createContext(null);
|
|
15
|
+
const SiteProvider = ({ children, ...context }) => {
|
|
16
|
+
const value = react.useMemo(() => context, []);
|
|
17
|
+
return /* @__PURE__ */ jsxRuntime.jsx(SiteContext.Provider, { value, children });
|
|
18
|
+
};
|
|
19
|
+
function useSiteContext() {
|
|
20
|
+
const context = react.useContext(SiteContext);
|
|
21
|
+
if (!context) {
|
|
22
|
+
throw new Error("useSiteContext must be used within SiteProvider");
|
|
23
|
+
}
|
|
24
|
+
return context;
|
|
25
|
+
}
|
|
26
|
+
const PageContext = react.createContext(null);
|
|
27
|
+
const PageProvider = ({ children, location }) => {
|
|
28
|
+
const { localization } = useSiteContext();
|
|
29
|
+
const { currentLocale } = index.useLocalization({ location, ...localization });
|
|
30
|
+
const value = react.useMemo(() => ({ currentLocale }), [currentLocale]);
|
|
31
|
+
return /* @__PURE__ */ jsxRuntime.jsx(PageContext.Provider, { value, children });
|
|
32
|
+
};
|
|
33
|
+
function usePageContext() {
|
|
34
|
+
const context = react.useContext(PageContext);
|
|
35
|
+
if (!context) {
|
|
36
|
+
throw new Error("usePageContext must be used within PageProvider");
|
|
37
|
+
}
|
|
38
|
+
return context;
|
|
39
|
+
}
|
|
13
40
|
function isImageUrl(image) {
|
|
14
41
|
return Boolean(typeof image === "string" && image.trim() !== "");
|
|
15
42
|
}
|
|
@@ -26,7 +53,7 @@ const Image = ({ src = "", mode = "default", hasZoom, ...plainImageProps }) => {
|
|
|
26
53
|
let image;
|
|
27
54
|
if (isImageUrl(src)) {
|
|
28
55
|
image = /* @__PURE__ */ jsxRuntime.jsx(
|
|
29
|
-
react.Image,
|
|
56
|
+
react$1.Image,
|
|
30
57
|
{
|
|
31
58
|
src,
|
|
32
59
|
...mode === "thumbnail" && { aspectRatio: "16/9", objectFit: "cover", objectPosition: "center" },
|
|
@@ -34,37 +61,14 @@ const Image = ({ src = "", mode = "default", hasZoom, ...plainImageProps }) => {
|
|
|
34
61
|
}
|
|
35
62
|
);
|
|
36
63
|
} else if (isImageComponent(src)) {
|
|
37
|
-
image = mode === "thumbnail" ? /* @__PURE__ */ jsxRuntime.jsx(react.Box, { aspectRatio: "16/9", children: src }) : src;
|
|
64
|
+
image = mode === "thumbnail" ? /* @__PURE__ */ jsxRuntime.jsx(react$1.Box, { aspectRatio: "16/9", children: src }) : src;
|
|
38
65
|
} else {
|
|
39
66
|
return null;
|
|
40
67
|
}
|
|
41
68
|
return hasZoom ? /* @__PURE__ */ jsxRuntime.jsx(Zoom, { wrapElement: "span", zoomMargin: 40, children: image }) : image;
|
|
42
69
|
};
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
const value = react$1.useMemo(() => context, []);
|
|
46
|
-
return /* @__PURE__ */ jsxRuntime.jsx(SiteContext.Provider, { value, children });
|
|
47
|
-
};
|
|
48
|
-
function useSiteContext() {
|
|
49
|
-
const context = react$1.useContext(SiteContext);
|
|
50
|
-
if (!context) {
|
|
51
|
-
throw new Error("useSiteContext must be used within SiteProvider");
|
|
52
|
-
}
|
|
53
|
-
return context;
|
|
54
|
-
}
|
|
55
|
-
const PageContext = react$1.createContext(null);
|
|
56
|
-
const PageProvider = ({ children, location }) => {
|
|
57
|
-
const { localization } = useSiteContext();
|
|
58
|
-
const { currentLocale } = index.useLocalization({ location, ...localization });
|
|
59
|
-
const value = react$1.useMemo(() => ({ currentLocale }), [currentLocale]);
|
|
60
|
-
return /* @__PURE__ */ jsxRuntime.jsx(PageContext.Provider, { value, children });
|
|
61
|
-
};
|
|
62
|
-
function usePageContext() {
|
|
63
|
-
const context = react$1.useContext(PageContext);
|
|
64
|
-
if (!context) {
|
|
65
|
-
throw new Error("usePageContext must be used within PageProvider");
|
|
66
|
-
}
|
|
67
|
-
return context;
|
|
70
|
+
function isExternalLink(path) {
|
|
71
|
+
return index$1.isAbsolutePath(path);
|
|
68
72
|
}
|
|
69
73
|
function normalizePath(path = "") {
|
|
70
74
|
return path.replace(/^\/+|\/+$/g, "").replace(/\/+/g, "/");
|
|
@@ -80,12 +84,24 @@ function getLocalizedPath(path, currentLocaleCode, defaultLocaleCode) {
|
|
|
80
84
|
}
|
|
81
85
|
return `${localePrefix}${normalizePath(path)}`;
|
|
82
86
|
}
|
|
83
|
-
const Link = react
|
|
87
|
+
const Link = react.forwardRef(({ to = "", isRedirectLink, ...props }, ref) => {
|
|
84
88
|
const { localization } = useSiteContext();
|
|
85
89
|
const { currentLocale } = usePageContext();
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
90
|
+
if (isExternalLink(to)) {
|
|
91
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
92
|
+
react$1.Link,
|
|
93
|
+
{
|
|
94
|
+
ref,
|
|
95
|
+
href: isRedirectLink ? `/follow?to=${to}` : to,
|
|
96
|
+
target: "_blank",
|
|
97
|
+
rel: "noopener noreferrer nofollow",
|
|
98
|
+
referrerPolicy: "no-referrer",
|
|
99
|
+
...props
|
|
100
|
+
}
|
|
101
|
+
);
|
|
102
|
+
}
|
|
103
|
+
const path = getLocalizedPath(to, currentLocale.code, localization.defaultLocale.code);
|
|
104
|
+
return /* @__PURE__ */ jsxRuntime.jsx(react$1.Link, { ref, as: gatsby.Link, to: path, ...props });
|
|
89
105
|
});
|
|
90
106
|
exports.Image = Image;
|
|
91
107
|
exports.Link = Link;
|