@deriv-web-design/ui 0.1.4 → 0.1.6
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/block-registry.json +3237 -140
- package/components.manifest.json +2902 -0
- package/dist/award-leaf-left-HVAB5T5H.png +0 -0
- package/dist/award-leaf-right-WR5I37KI.png +0 -0
- package/dist/index.css +1941 -5
- package/dist/index.css.map +1 -1
- package/dist/index.d.mts +494 -13
- package/dist/index.d.ts +494 -13
- package/dist/index.js +1435 -19
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1420 -20
- package/dist/index.mjs.map +1 -1
- package/dist/share-facebook-3B3NOC5Q.png +0 -0
- package/dist/share-link-QGD6KIDA.png +0 -0
- package/dist/share-linkedin-UCIII3JU.png +0 -0
- package/dist/share-telegram-QRXGSHQT.png +0 -0
- package/dist/share-x-UTEBBL73.png +0 -0
- package/dist/trustpilot-rating-badge-D7JOW3KJ.png +0 -0
- package/package.json +21 -5
package/dist/index.js
CHANGED
|
@@ -30,16 +30,27 @@ __export(index_exports, {
|
|
|
30
30
|
Button: () => Button,
|
|
31
31
|
COL_ONE_LOGOS: () => COL_ONE_LOGOS,
|
|
32
32
|
COL_TWO_LOGOS: () => COL_TWO_LOGOS,
|
|
33
|
+
CORAL_BANNER_DERIV_SLIDES: () => CORAL_BANNER_DERIV_SLIDES,
|
|
33
34
|
CTABanner: () => CTABanner,
|
|
34
35
|
Card: () => Card,
|
|
35
36
|
Chip: () => Chip,
|
|
36
37
|
ChipDropdown: () => ChipDropdown,
|
|
38
|
+
CoralBanner: () => CoralBanner,
|
|
39
|
+
DEFAULT_AWARDS: () => DEFAULT_AWARDS,
|
|
40
|
+
DEFAULT_CULTURE_CARDS: () => DEFAULT_CULTURE_CARDS,
|
|
37
41
|
DayNightTransition: () => DayNightTransition,
|
|
38
42
|
DotLottieInView: () => DotLottieInView,
|
|
39
43
|
DownloadBadge: () => DownloadBadge,
|
|
40
44
|
DownloadBanner: () => DownloadBanner,
|
|
45
|
+
FEATURE_AWARDS_TEXT_CONTENT: () => FEATURE_AWARDS_TEXT_CONTENT,
|
|
46
|
+
FEATURE_BLOG_CATEGORIES_TEXT_CONTENT: () => FEATURE_BLOG_CATEGORIES_TEXT_CONTENT,
|
|
47
|
+
FEATURE_BLOG_TEXT_CONTENT: () => FEATURE_BLOG_TEXT_CONTENT,
|
|
41
48
|
FEATURE_SCROLL_DATA: () => FEATURE_SCROLL_DATA,
|
|
42
49
|
FaqAccordion: () => FaqAccordion,
|
|
50
|
+
FeatureAwards: () => FeatureAwards,
|
|
51
|
+
FeatureBlog: () => FeatureBlog,
|
|
52
|
+
FeatureBlogCategories: () => FeatureBlogCategories,
|
|
53
|
+
FeatureBlogPage: () => FeatureBlogPage,
|
|
43
54
|
FeatureBullets: () => FeatureBullets,
|
|
44
55
|
FeatureCards: () => FeatureCards,
|
|
45
56
|
FeatureCardsIcon: () => FeatureCardsIcon,
|
|
@@ -47,13 +58,18 @@ __export(index_exports, {
|
|
|
47
58
|
FeatureSplit: () => FeatureSplit,
|
|
48
59
|
Footer: () => Footer,
|
|
49
60
|
Header: () => Header,
|
|
61
|
+
HelpCenterPage: () => HelpCenterPage,
|
|
62
|
+
HelpCentreCategories: () => HelpCentreCategories,
|
|
63
|
+
HelpCentreSubCategories: () => HelpCentreSubCategories,
|
|
50
64
|
Hero: () => Hero,
|
|
51
65
|
ImageBanner: () => ImageBanner,
|
|
52
66
|
Leaders: () => Leaders,
|
|
53
67
|
Link: () => Link,
|
|
54
68
|
LogoMarquee: () => LogoMarquee,
|
|
55
69
|
Navbar: () => Navbar,
|
|
70
|
+
PARALLAX_BANNER_TEXT_CONTENT: () => PARALLAX_BANNER_TEXT_CONTENT,
|
|
56
71
|
Pagination: () => Pagination,
|
|
72
|
+
ParallaxBanner: () => ParallaxBanner,
|
|
57
73
|
PeopleGrid: () => PeopleGrid,
|
|
58
74
|
STEPS_DATA: () => STEPS_DATA,
|
|
59
75
|
SearchField: () => SearchField,
|
|
@@ -342,6 +358,7 @@ var SearchField = (0, import_react3.forwardRef)(
|
|
|
342
358
|
({
|
|
343
359
|
variant = "outline",
|
|
344
360
|
status = "neutral",
|
|
361
|
+
showSearchIcon = true,
|
|
345
362
|
value,
|
|
346
363
|
defaultValue,
|
|
347
364
|
onChange,
|
|
@@ -396,7 +413,7 @@ var SearchField = (0, import_react3.forwardRef)(
|
|
|
396
413
|
className: wrapperClass,
|
|
397
414
|
"data-disabled": disabled || void 0,
|
|
398
415
|
children: [
|
|
399
|
-
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { className: "iconSlot", children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(SearchIcon, {}) }),
|
|
416
|
+
showSearchIcon && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { className: "iconSlot", children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(SearchIcon, {}) }),
|
|
400
417
|
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
401
418
|
"input",
|
|
402
419
|
{
|
|
@@ -940,6 +957,21 @@ var CardThumbnailVariant = ({
|
|
|
940
957
|
const isVideo = type === "video";
|
|
941
958
|
const isHorizontal = layout === "horizontal" || layout === "horizontal-reverse";
|
|
942
959
|
const isReversed = layout === "horizontal-reverse";
|
|
960
|
+
const hasTags = !hideTags && tags.length > 0;
|
|
961
|
+
const tagsNode = hasTags && (isHorizontal ? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: "ct-tagsList", children: tags.map((tag, i) => /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("span", { className: "ct-tagItem", children: [
|
|
962
|
+
i > 0 && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { "aria-hidden": "true", className: "ct-tagDot", children: "\xB7" }),
|
|
963
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(Tag, { icon: tag.icon, label: tag.label, size: "md", variant: "custom" })
|
|
964
|
+
] }, i)) }) : /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: "ct-tagsRow", children: tags.map((tag, i) => /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(Tag, { icon: tag.icon, label: tag.label, size: "md", variant: "fill" }, i)) }));
|
|
965
|
+
const copyLinkNode = showCopyLink && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
966
|
+
"button",
|
|
967
|
+
{
|
|
968
|
+
"aria-label": "Copy link",
|
|
969
|
+
className: "ct-copyLink",
|
|
970
|
+
onClick: onCopyLink,
|
|
971
|
+
type: "button",
|
|
972
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(LinkIcon, {})
|
|
973
|
+
}
|
|
974
|
+
);
|
|
943
975
|
return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(
|
|
944
976
|
"div",
|
|
945
977
|
{
|
|
@@ -952,24 +984,13 @@ var CardThumbnailVariant = ({
|
|
|
952
984
|
!isVideo && !hideAvatar && avatar && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("img", { alt: avatarAlt, className: "ct-avatar", src: avatar })
|
|
953
985
|
] }),
|
|
954
986
|
/* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "ct-content", children: [
|
|
987
|
+
!isHorizontal && tagsNode,
|
|
955
988
|
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("p", { className: "ct-title", children: title }),
|
|
956
989
|
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("p", { className: "ct-summary", children: summary }),
|
|
957
|
-
/* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "ct-metaRow", children: [
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
] }, i)) }),
|
|
962
|
-
showCopyLink && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
963
|
-
"button",
|
|
964
|
-
{
|
|
965
|
-
"aria-label": "Copy link",
|
|
966
|
-
className: "ct-copyLink",
|
|
967
|
-
onClick: onCopyLink,
|
|
968
|
-
type: "button",
|
|
969
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(LinkIcon, {})
|
|
970
|
-
}
|
|
971
|
-
)
|
|
972
|
-
] })
|
|
990
|
+
isHorizontal ? (tagsNode || copyLinkNode) && /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "ct-metaRow", children: [
|
|
991
|
+
tagsNode,
|
|
992
|
+
copyLinkNode
|
|
993
|
+
] }) : copyLinkNode && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: "ct-metaRow ct-metaRow--end", children: copyLinkNode })
|
|
973
994
|
] })
|
|
974
995
|
]
|
|
975
996
|
}
|
|
@@ -1972,6 +1993,24 @@ var ButtonBlock2 = ({
|
|
|
1972
1993
|
))
|
|
1973
1994
|
] });
|
|
1974
1995
|
};
|
|
1996
|
+
var SearchBlock = ({ search }) => {
|
|
1997
|
+
const handleKeyDown = (event) => {
|
|
1998
|
+
if (event.key === "Enter") {
|
|
1999
|
+
search?.onSubmit?.(event.currentTarget.value);
|
|
2000
|
+
}
|
|
2001
|
+
};
|
|
2002
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { className: "header__search", children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
2003
|
+
SearchField,
|
|
2004
|
+
{
|
|
2005
|
+
placeholder: search?.placeholder ?? "Search",
|
|
2006
|
+
value: search?.value,
|
|
2007
|
+
onChange: search?.onChange,
|
|
2008
|
+
onClear: search?.onClear,
|
|
2009
|
+
onKeyDown: handleKeyDown,
|
|
2010
|
+
showSearchIcon: false
|
|
2011
|
+
}
|
|
2012
|
+
) });
|
|
2013
|
+
};
|
|
1975
2014
|
var Header = ({
|
|
1976
2015
|
variant,
|
|
1977
2016
|
subtitle,
|
|
@@ -1981,6 +2020,7 @@ var Header = ({
|
|
|
1981
2020
|
secondaryButton,
|
|
1982
2021
|
leftVisual,
|
|
1983
2022
|
rightVisual,
|
|
2023
|
+
search,
|
|
1984
2024
|
className,
|
|
1985
2025
|
...props
|
|
1986
2026
|
}) => {
|
|
@@ -2036,6 +2076,7 @@ var Header = ({
|
|
|
2036
2076
|
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { className: "header__overlay", "aria-hidden": "true" }),
|
|
2037
2077
|
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { className: "header__inner", children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { className: "header__content", children: /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { className: "header__body", children: [
|
|
2038
2078
|
textBlock,
|
|
2079
|
+
variant === "dark-search" && /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(SearchBlock, { search }),
|
|
2039
2080
|
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
2040
2081
|
ButtonBlock2,
|
|
2041
2082
|
{
|
|
@@ -5245,9 +5286,181 @@ var quote_left_default = "./quote-left-63QMW5NQ.webp";
|
|
|
5245
5286
|
// assets/quote-right.webp
|
|
5246
5287
|
var quote_right_default = "./quote-right-W6AS4YHN.webp";
|
|
5247
5288
|
|
|
5289
|
+
// assets/trustpilot-rating-badge.png
|
|
5290
|
+
var trustpilot_rating_badge_default = "./trustpilot-rating-badge-D7JOW3KJ.png";
|
|
5291
|
+
|
|
5248
5292
|
// templates/Testimonial/Testimonial.tsx
|
|
5249
5293
|
var import_jsx_runtime43 = require("react/jsx-runtime");
|
|
5250
|
-
var
|
|
5294
|
+
var StarCell = ({ fill }) => {
|
|
5295
|
+
const clipId = (0, import_react23.useId)();
|
|
5296
|
+
const clamped = Math.max(0, Math.min(1, fill));
|
|
5297
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(
|
|
5298
|
+
"svg",
|
|
5299
|
+
{
|
|
5300
|
+
className: "testimonial__tp-star",
|
|
5301
|
+
viewBox: "0 0 96 96",
|
|
5302
|
+
width: "20",
|
|
5303
|
+
height: "20",
|
|
5304
|
+
"aria-hidden": "true",
|
|
5305
|
+
children: [
|
|
5306
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)("rect", { width: "96", height: "96", className: "testimonial__tp-star-bg" }),
|
|
5307
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)("clipPath", { id: clipId, children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("rect", { width: 96 * clamped, height: "96" }) }),
|
|
5308
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
5309
|
+
"rect",
|
|
5310
|
+
{
|
|
5311
|
+
width: "96",
|
|
5312
|
+
height: "96",
|
|
5313
|
+
className: "testimonial__tp-star-fill",
|
|
5314
|
+
clipPath: `url(#${clipId})`
|
|
5315
|
+
}
|
|
5316
|
+
),
|
|
5317
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
5318
|
+
"path",
|
|
5319
|
+
{
|
|
5320
|
+
d: "M48,64.7L62.6,61l6.1,18.8L48,64.7z M81.6,40.4H55.9L48,16.2l-7.9,24.2H14.4l20.8,15l-7.9,24.2 l20.8-15l12.8-9.2L81.6,40.4L81.6,40.4L81.6,40.4L81.6,40.4z",
|
|
5321
|
+
className: "testimonial__tp-star-glyph"
|
|
5322
|
+
}
|
|
5323
|
+
)
|
|
5324
|
+
]
|
|
5325
|
+
}
|
|
5326
|
+
);
|
|
5327
|
+
};
|
|
5328
|
+
var StarRow = ({ rating, size = "sm" }) => {
|
|
5329
|
+
const stars = [0, 1, 2, 3, 4].map((i) => Math.max(0, Math.min(1, rating - i)));
|
|
5330
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
5331
|
+
"span",
|
|
5332
|
+
{
|
|
5333
|
+
className: ["testimonial__tp-stars", `testimonial__tp-stars--${size}`].join(" "),
|
|
5334
|
+
role: "img",
|
|
5335
|
+
"aria-label": `Rated ${rating} out of 5 stars`,
|
|
5336
|
+
children: stars.map((fill, i) => /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(StarCell, { fill }, i))
|
|
5337
|
+
}
|
|
5338
|
+
);
|
|
5339
|
+
};
|
|
5340
|
+
var ArrowIcon = ({ direction }) => /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", "aria-hidden": "true", children: direction === "prev" ? /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("path", { d: "M10 3.5 5.5 8l4.5 4.5", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }) : /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("path", { d: "M6 3.5 10.5 8 6 12.5", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }) });
|
|
5341
|
+
var SCROLL_EPS = 4;
|
|
5342
|
+
function readScrollState(el) {
|
|
5343
|
+
if (!el) return { canPrev: false, canNext: false };
|
|
5344
|
+
const { scrollLeft, scrollWidth, clientWidth } = el;
|
|
5345
|
+
const maxScroll = scrollWidth - clientWidth;
|
|
5346
|
+
return {
|
|
5347
|
+
canPrev: scrollLeft > SCROLL_EPS,
|
|
5348
|
+
canNext: scrollLeft < maxScroll - SCROLL_EPS
|
|
5349
|
+
};
|
|
5350
|
+
}
|
|
5351
|
+
var TrustpilotTestimonial = ({
|
|
5352
|
+
title,
|
|
5353
|
+
items,
|
|
5354
|
+
className,
|
|
5355
|
+
trustpilotUrl = "https://www.trustpilot.com/review/deriv.com?utm_medium=trustbox&utm_source=Mini",
|
|
5356
|
+
trustpilotScore = 4.5,
|
|
5357
|
+
...props
|
|
5358
|
+
}) => {
|
|
5359
|
+
const trackRef = (0, import_react23.useRef)(null);
|
|
5360
|
+
const [canPrev, setCanPrev] = (0, import_react23.useState)(false);
|
|
5361
|
+
const [canNext, setCanNext] = (0, import_react23.useState)(true);
|
|
5362
|
+
const syncScrollState = (0, import_react23.useCallback)(() => {
|
|
5363
|
+
const next = readScrollState(trackRef.current);
|
|
5364
|
+
setCanPrev(next.canPrev);
|
|
5365
|
+
setCanNext(next.canNext);
|
|
5366
|
+
}, []);
|
|
5367
|
+
(0, import_react23.useEffect)(() => {
|
|
5368
|
+
const el = trackRef.current;
|
|
5369
|
+
if (!el) return;
|
|
5370
|
+
syncScrollState();
|
|
5371
|
+
const ro = new ResizeObserver(() => syncScrollState());
|
|
5372
|
+
ro.observe(el);
|
|
5373
|
+
return () => ro.disconnect();
|
|
5374
|
+
}, [syncScrollState]);
|
|
5375
|
+
const scrollByCard = (direction) => {
|
|
5376
|
+
const el = trackRef.current;
|
|
5377
|
+
if (!el) return;
|
|
5378
|
+
const card = el.querySelector(".testimonial__tp-card-wrap");
|
|
5379
|
+
const gap = Number.parseFloat(getComputedStyle(el).columnGap || "0") || 0;
|
|
5380
|
+
const delta = card?.offsetWidth ?? el.clientWidth * 0.85;
|
|
5381
|
+
el.scrollBy({ left: direction * (delta + gap), behavior: "smooth" });
|
|
5382
|
+
window.requestAnimationFrame(() => window.setTimeout(syncScrollState, 320));
|
|
5383
|
+
};
|
|
5384
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(
|
|
5385
|
+
"section",
|
|
5386
|
+
{
|
|
5387
|
+
className: ["testimonial", "testimonial--trustpilot", className].filter(Boolean).join(" "),
|
|
5388
|
+
...props,
|
|
5389
|
+
children: [
|
|
5390
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)("div", { className: "testimonial__tp-head", children: title && /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("h2", { className: "testimonial__title testimonial__title--trustpilot", children: title }) }),
|
|
5391
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)("div", { className: "testimonial__tp-bleed", children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
5392
|
+
"div",
|
|
5393
|
+
{
|
|
5394
|
+
ref: trackRef,
|
|
5395
|
+
className: "testimonial__tp-carousel",
|
|
5396
|
+
tabIndex: 0,
|
|
5397
|
+
role: "region",
|
|
5398
|
+
"aria-roledescription": "carousel",
|
|
5399
|
+
"aria-label": "Customer reviews on Trustpilot",
|
|
5400
|
+
onScroll: syncScrollState,
|
|
5401
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("div", { className: "testimonial__tp-track", children: items.map((item, i) => /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("div", { className: "testimonial__tp-card-wrap", children: /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(
|
|
5402
|
+
"a",
|
|
5403
|
+
{
|
|
5404
|
+
href: item.reviewUrl ?? trustpilotUrl,
|
|
5405
|
+
className: "testimonial__tp-card",
|
|
5406
|
+
target: "_blank",
|
|
5407
|
+
rel: "noopener noreferrer",
|
|
5408
|
+
children: [
|
|
5409
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(StarRow, { rating: item.rating ?? 5, size: "sm" }),
|
|
5410
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)("p", { className: "testimonial__tp-quote", children: item.quote }),
|
|
5411
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)("p", { className: "testimonial__tp-author", children: item.authorName })
|
|
5412
|
+
]
|
|
5413
|
+
}
|
|
5414
|
+
) }, i)) })
|
|
5415
|
+
}
|
|
5416
|
+
) }),
|
|
5417
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)("div", { className: "testimonial__tp-foot", children: /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("div", { className: "testimonial__tp-footer", children: [
|
|
5418
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)("div", { className: "testimonial__tp-trust", children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
5419
|
+
"a",
|
|
5420
|
+
{
|
|
5421
|
+
href: trustpilotUrl,
|
|
5422
|
+
className: "testimonial__tp-badge",
|
|
5423
|
+
target: "_blank",
|
|
5424
|
+
rel: "noopener noreferrer",
|
|
5425
|
+
"aria-label": `Deriv on Trustpilot \u2014 rated ${trustpilotScore} out of 5`,
|
|
5426
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
5427
|
+
"img",
|
|
5428
|
+
{
|
|
5429
|
+
src: trustpilot_rating_badge_default,
|
|
5430
|
+
alt: "",
|
|
5431
|
+
className: "testimonial__tp-badge-img"
|
|
5432
|
+
}
|
|
5433
|
+
)
|
|
5434
|
+
}
|
|
5435
|
+
) }),
|
|
5436
|
+
items.length > 1 && (canPrev || canNext) && /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("div", { className: "testimonial__tp-nav", children: [
|
|
5437
|
+
canPrev && /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
5438
|
+
"button",
|
|
5439
|
+
{
|
|
5440
|
+
type: "button",
|
|
5441
|
+
className: "testimonial__tp-nav-btn",
|
|
5442
|
+
"aria-label": "Show previous testimonials",
|
|
5443
|
+
onClick: () => scrollByCard(-1),
|
|
5444
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(ArrowIcon, { direction: "prev" })
|
|
5445
|
+
}
|
|
5446
|
+
),
|
|
5447
|
+
canNext && /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
5448
|
+
"button",
|
|
5449
|
+
{
|
|
5450
|
+
type: "button",
|
|
5451
|
+
className: "testimonial__tp-nav-btn",
|
|
5452
|
+
"aria-label": "Show next testimonials",
|
|
5453
|
+
onClick: () => scrollByCard(1),
|
|
5454
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(ArrowIcon, { direction: "next" })
|
|
5455
|
+
}
|
|
5456
|
+
)
|
|
5457
|
+
] })
|
|
5458
|
+
] }) })
|
|
5459
|
+
]
|
|
5460
|
+
}
|
|
5461
|
+
);
|
|
5462
|
+
};
|
|
5463
|
+
var DefaultTestimonial = ({
|
|
5251
5464
|
title,
|
|
5252
5465
|
items,
|
|
5253
5466
|
className,
|
|
@@ -5282,7 +5495,6 @@ var Testimonial = ({
|
|
|
5282
5495
|
if (autoRef.current) clearTimeout(autoRef.current);
|
|
5283
5496
|
};
|
|
5284
5497
|
}, [activeIndex, items.length]);
|
|
5285
|
-
if (!items || items.length === 0) return null;
|
|
5286
5498
|
return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
5287
5499
|
"section",
|
|
5288
5500
|
{
|
|
@@ -5358,6 +5570,13 @@ var Testimonial = ({
|
|
|
5358
5570
|
}
|
|
5359
5571
|
);
|
|
5360
5572
|
};
|
|
5573
|
+
var Testimonial = (props) => {
|
|
5574
|
+
if (!props.items || props.items.length === 0) return null;
|
|
5575
|
+
if (props.variant === "trustpilot") {
|
|
5576
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(TrustpilotTestimonial, { ...props });
|
|
5577
|
+
}
|
|
5578
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(DefaultTestimonial, { ...props });
|
|
5579
|
+
};
|
|
5361
5580
|
|
|
5362
5581
|
// templates/ArticleHero/ArticleHero.tsx
|
|
5363
5582
|
var import_jsx_runtime44 = require("react/jsx-runtime");
|
|
@@ -5638,6 +5857,1187 @@ var ArticleSection = ({
|
|
|
5638
5857
|
] })
|
|
5639
5858
|
] });
|
|
5640
5859
|
};
|
|
5860
|
+
|
|
5861
|
+
// templates/CoralBanner/CoralBanner.tsx
|
|
5862
|
+
var import_react24 = require("react");
|
|
5863
|
+
var import_jsx_runtime46 = require("react/jsx-runtime");
|
|
5864
|
+
var DEFAULT_SLIDES = [
|
|
5865
|
+
{
|
|
5866
|
+
title: "Section title goes here",
|
|
5867
|
+
description: "Explain how this specific feature helps your user.",
|
|
5868
|
+
primaryButton: { label: "Get started", href: "#" }
|
|
5869
|
+
}
|
|
5870
|
+
];
|
|
5871
|
+
var CORAL_BANNER_DERIV_SLIDES = [
|
|
5872
|
+
{
|
|
5873
|
+
id: "ai-insights",
|
|
5874
|
+
title: "Analyse markets with AI-powered insights",
|
|
5875
|
+
primaryButton: { label: "Explore TradersView", href: "#" }
|
|
5876
|
+
},
|
|
5877
|
+
{
|
|
5878
|
+
id: "join-traders",
|
|
5879
|
+
title: "Join 3M+\nglobal traders",
|
|
5880
|
+
description: "Open an account in minutes and start trading the world's markets \u2014 forex, stocks, indices, and more.",
|
|
5881
|
+
primaryButton: { label: "Trade now", href: "#" }
|
|
5882
|
+
}
|
|
5883
|
+
];
|
|
5884
|
+
var LeftArrowIcon = () => /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("svg", { viewBox: "0 0 16 16", fill: "none", "aria-hidden": "true", focusable: "false", children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
5885
|
+
"path",
|
|
5886
|
+
{
|
|
5887
|
+
d: "M3.31066 8.75001L9.03033 14.4697L7.96967 15.5303L0.439339 8.00001L7.96967 0.469676L9.03033 1.53034L3.31066 7.25001L15.5 7.25L15.5 8.75L3.31066 8.75001Z",
|
|
5888
|
+
fill: "currentColor"
|
|
5889
|
+
}
|
|
5890
|
+
) });
|
|
5891
|
+
var RightArrowIcon = () => /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("svg", { viewBox: "0 0 16 16", fill: "none", "aria-hidden": "true", focusable: "false", children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
5892
|
+
"path",
|
|
5893
|
+
{
|
|
5894
|
+
d: "M12.6893 7.25L6.96967 1.53033L8.03033 0.469666L15.5607 8L8.03033 15.5303L6.96967 14.4697L12.6893 8.75H0.5V7.25H12.6893Z",
|
|
5895
|
+
fill: "currentColor"
|
|
5896
|
+
}
|
|
5897
|
+
) });
|
|
5898
|
+
var renderTitleLines = (title) => {
|
|
5899
|
+
const lines = title.split("\n");
|
|
5900
|
+
return lines.map((line, i) => /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("span", { children: [
|
|
5901
|
+
line,
|
|
5902
|
+
i < lines.length - 1 && /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("br", {})
|
|
5903
|
+
] }, i));
|
|
5904
|
+
};
|
|
5905
|
+
var ButtonBlock3 = ({
|
|
5906
|
+
primaryButton,
|
|
5907
|
+
secondaryButton
|
|
5908
|
+
}) => {
|
|
5909
|
+
if (!primaryButton && !secondaryButton) return null;
|
|
5910
|
+
return /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("div", { className: "crb__buttons", children: [
|
|
5911
|
+
primaryButton && (primaryButton.href ? /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("a", { href: primaryButton.href, children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
5912
|
+
Button,
|
|
5913
|
+
{
|
|
5914
|
+
colorScheme: "black",
|
|
5915
|
+
variant: "primary",
|
|
5916
|
+
label: primaryButton.label,
|
|
5917
|
+
onClick: primaryButton.onClick
|
|
5918
|
+
}
|
|
5919
|
+
) }) : /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
5920
|
+
Button,
|
|
5921
|
+
{
|
|
5922
|
+
colorScheme: "black",
|
|
5923
|
+
variant: "primary",
|
|
5924
|
+
label: primaryButton.label,
|
|
5925
|
+
onClick: primaryButton.onClick
|
|
5926
|
+
}
|
|
5927
|
+
)),
|
|
5928
|
+
secondaryButton && (secondaryButton.href ? /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("a", { href: secondaryButton.href, children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
5929
|
+
Button,
|
|
5930
|
+
{
|
|
5931
|
+
colorScheme: "white",
|
|
5932
|
+
variant: "secondary",
|
|
5933
|
+
label: secondaryButton.label,
|
|
5934
|
+
onClick: secondaryButton.onClick
|
|
5935
|
+
}
|
|
5936
|
+
) }) : /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
5937
|
+
Button,
|
|
5938
|
+
{
|
|
5939
|
+
colorScheme: "white",
|
|
5940
|
+
variant: "secondary",
|
|
5941
|
+
label: secondaryButton.label,
|
|
5942
|
+
onClick: secondaryButton.onClick
|
|
5943
|
+
}
|
|
5944
|
+
))
|
|
5945
|
+
] });
|
|
5946
|
+
};
|
|
5947
|
+
var SlideContent = ({ slide }) => /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("div", { className: "crb__grid", children: [
|
|
5948
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("div", { className: "crb__content", children: [
|
|
5949
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)("h3", { className: "crb__title", children: renderTitleLines(slide.title) }),
|
|
5950
|
+
slide.description && /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("p", { className: "crb__description", children: slide.description }),
|
|
5951
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
5952
|
+
ButtonBlock3,
|
|
5953
|
+
{
|
|
5954
|
+
primaryButton: slide.primaryButton,
|
|
5955
|
+
secondaryButton: slide.secondaryButton
|
|
5956
|
+
}
|
|
5957
|
+
)
|
|
5958
|
+
] }),
|
|
5959
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)("div", { className: "crb__spacer", "aria-hidden": "true" })
|
|
5960
|
+
] });
|
|
5961
|
+
var CoralBanner = ({
|
|
5962
|
+
variant = "static",
|
|
5963
|
+
slides,
|
|
5964
|
+
autoplay = true,
|
|
5965
|
+
autoplayDelay = 2e3,
|
|
5966
|
+
transitionDuration = 330,
|
|
5967
|
+
infinite = true,
|
|
5968
|
+
showArrows = true,
|
|
5969
|
+
showDots = true,
|
|
5970
|
+
className,
|
|
5971
|
+
...props
|
|
5972
|
+
}) => {
|
|
5973
|
+
const resolvedSlides = slides && slides.length > 0 ? slides : DEFAULT_SLIDES;
|
|
5974
|
+
const count = resolvedSlides.length;
|
|
5975
|
+
const isCarousel = variant === "carousel" && count > 1;
|
|
5976
|
+
const [activeIndex, setActiveIndex] = (0, import_react24.useState)(0);
|
|
5977
|
+
const autoplayTimer = (0, import_react24.useRef)(null);
|
|
5978
|
+
const dragState = (0, import_react24.useRef)(null);
|
|
5979
|
+
const goTo = (0, import_react24.useCallback)(
|
|
5980
|
+
(index) => {
|
|
5981
|
+
if (count <= 1) return;
|
|
5982
|
+
const next = infinite ? (index % count + count) % count : Math.max(0, Math.min(index, count - 1));
|
|
5983
|
+
setActiveIndex(next);
|
|
5984
|
+
},
|
|
5985
|
+
[count, infinite]
|
|
5986
|
+
);
|
|
5987
|
+
const goNext = (0, import_react24.useCallback)(() => goTo(activeIndex + 1), [activeIndex, goTo]);
|
|
5988
|
+
const goPrev = (0, import_react24.useCallback)(() => goTo(activeIndex - 1), [activeIndex, goTo]);
|
|
5989
|
+
const resetAutoplay = () => {
|
|
5990
|
+
if (autoplayTimer.current) clearTimeout(autoplayTimer.current);
|
|
5991
|
+
};
|
|
5992
|
+
(0, import_react24.useEffect)(() => {
|
|
5993
|
+
if (!isCarousel || !autoplay) return;
|
|
5994
|
+
autoplayTimer.current = setTimeout(() => {
|
|
5995
|
+
goTo(activeIndex + 1);
|
|
5996
|
+
}, autoplayDelay);
|
|
5997
|
+
return () => resetAutoplay();
|
|
5998
|
+
}, [isCarousel, autoplay, autoplayDelay, activeIndex]);
|
|
5999
|
+
const handlePointerDown = (e) => {
|
|
6000
|
+
if (!isCarousel) return;
|
|
6001
|
+
dragState.current = { startX: e.clientX };
|
|
6002
|
+
};
|
|
6003
|
+
const handlePointerUp = (e) => {
|
|
6004
|
+
if (!isCarousel || !dragState.current) return;
|
|
6005
|
+
const delta = e.clientX - dragState.current.startX;
|
|
6006
|
+
dragState.current = null;
|
|
6007
|
+
const SWIPE_THRESHOLD = 40;
|
|
6008
|
+
if (delta > SWIPE_THRESHOLD) {
|
|
6009
|
+
resetAutoplay();
|
|
6010
|
+
goPrev();
|
|
6011
|
+
} else if (delta < -SWIPE_THRESHOLD) {
|
|
6012
|
+
resetAutoplay();
|
|
6013
|
+
goNext();
|
|
6014
|
+
}
|
|
6015
|
+
};
|
|
6016
|
+
const rootClass = [
|
|
6017
|
+
"crb",
|
|
6018
|
+
isCarousel ? "crb--carousel" : "crb--static",
|
|
6019
|
+
className
|
|
6020
|
+
].filter(Boolean).join(" ");
|
|
6021
|
+
if (!isCarousel) {
|
|
6022
|
+
return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("section", { className: rootClass, ...props, children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("div", { className: "crb__inner", children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("div", { className: "crb__stage", children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(SlideContent, { slide: resolvedSlides[0] }) }) }) });
|
|
6023
|
+
}
|
|
6024
|
+
return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("section", { className: rootClass, ...props, children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("div", { className: "crb__inner", children: /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("div", { className: "crb__stage", children: [
|
|
6025
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
6026
|
+
"div",
|
|
6027
|
+
{
|
|
6028
|
+
className: "crb__viewport",
|
|
6029
|
+
onPointerDown: handlePointerDown,
|
|
6030
|
+
onPointerUp: handlePointerUp,
|
|
6031
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
6032
|
+
"div",
|
|
6033
|
+
{
|
|
6034
|
+
className: "crb__track",
|
|
6035
|
+
style: {
|
|
6036
|
+
transform: `translateX(-${activeIndex * 100}%)`,
|
|
6037
|
+
transitionDuration: `${transitionDuration}ms`
|
|
6038
|
+
},
|
|
6039
|
+
children: resolvedSlides.map((slide, i) => /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
6040
|
+
"div",
|
|
6041
|
+
{
|
|
6042
|
+
className: "crb__slide",
|
|
6043
|
+
role: "group",
|
|
6044
|
+
"aria-roledescription": "slide",
|
|
6045
|
+
"aria-label": `${i + 1} of ${count}`,
|
|
6046
|
+
"aria-hidden": i !== activeIndex,
|
|
6047
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(SlideContent, { slide })
|
|
6048
|
+
},
|
|
6049
|
+
slide.id ?? i
|
|
6050
|
+
))
|
|
6051
|
+
}
|
|
6052
|
+
)
|
|
6053
|
+
}
|
|
6054
|
+
),
|
|
6055
|
+
showDots && /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("div", { className: "crb__dots", role: "tablist", "aria-label": "Banner slide navigation", children: resolvedSlides.map((_, i) => /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
6056
|
+
"button",
|
|
6057
|
+
{
|
|
6058
|
+
type: "button",
|
|
6059
|
+
role: "tab",
|
|
6060
|
+
"aria-selected": i === activeIndex,
|
|
6061
|
+
"aria-label": `Go to slide ${i + 1} of ${count}`,
|
|
6062
|
+
className: [
|
|
6063
|
+
"crb__dot",
|
|
6064
|
+
i === activeIndex ? "crb__dot--active" : ""
|
|
6065
|
+
].filter(Boolean).join(" "),
|
|
6066
|
+
onClick: () => {
|
|
6067
|
+
resetAutoplay();
|
|
6068
|
+
goTo(i);
|
|
6069
|
+
}
|
|
6070
|
+
},
|
|
6071
|
+
i
|
|
6072
|
+
)) }),
|
|
6073
|
+
showArrows && /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("div", { className: "crb__arrows", children: [
|
|
6074
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
6075
|
+
"button",
|
|
6076
|
+
{
|
|
6077
|
+
type: "button",
|
|
6078
|
+
className: "crb__arrow crb__arrow--prev",
|
|
6079
|
+
"aria-label": "Previous slide",
|
|
6080
|
+
onClick: () => {
|
|
6081
|
+
resetAutoplay();
|
|
6082
|
+
goPrev();
|
|
6083
|
+
},
|
|
6084
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(LeftArrowIcon, {})
|
|
6085
|
+
}
|
|
6086
|
+
),
|
|
6087
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
6088
|
+
"button",
|
|
6089
|
+
{
|
|
6090
|
+
type: "button",
|
|
6091
|
+
className: "crb__arrow crb__arrow--next",
|
|
6092
|
+
"aria-label": "Next slide",
|
|
6093
|
+
onClick: () => {
|
|
6094
|
+
resetAutoplay();
|
|
6095
|
+
goNext();
|
|
6096
|
+
},
|
|
6097
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(RightArrowIcon, {})
|
|
6098
|
+
}
|
|
6099
|
+
)
|
|
6100
|
+
] })
|
|
6101
|
+
] }) }) });
|
|
6102
|
+
};
|
|
6103
|
+
|
|
6104
|
+
// assets/award-leaf-left.png
|
|
6105
|
+
var award_leaf_left_default = "./award-leaf-left-HVAB5T5H.png";
|
|
6106
|
+
|
|
6107
|
+
// assets/award-leaf-right.png
|
|
6108
|
+
var award_leaf_right_default = "./award-leaf-right-WR5I37KI.png";
|
|
6109
|
+
|
|
6110
|
+
// templates/FeatureAwards/FeatureAwards.tsx
|
|
6111
|
+
var import_jsx_runtime47 = require("react/jsx-runtime");
|
|
6112
|
+
var FEATURE_AWARDS_TEXT_CONTENT = {
|
|
6113
|
+
title: "Our awards"
|
|
6114
|
+
};
|
|
6115
|
+
var DEFAULT_AWARDS = [
|
|
6116
|
+
{ title: "Best Trade Execution Award (MEA)", subtitle: "Ultimate Fintech 2026" },
|
|
6117
|
+
{ title: "Best Trading Experience - Global", subtitle: "UF Awards 2025" },
|
|
6118
|
+
{ title: "Best CFD Broker - LATAM", subtitle: "UF Awards 2025" },
|
|
6119
|
+
{ title: "Most Innovative Broker - MEA", subtitle: "UF Awards 2025" },
|
|
6120
|
+
{ title: "Most Transparent Broker - Global", subtitle: "Global Forex Awards 2025" },
|
|
6121
|
+
{ title: "Best Broker - Africa", subtitle: "Global Forex Awards 2025" },
|
|
6122
|
+
{ title: "Best Trading Platform - MENA", subtitle: "Global Forex Awards 2025" },
|
|
6123
|
+
{ title: "Most Innovative Online Trading Platform", subtitle: "Forex Expo Dubai 2025" },
|
|
6124
|
+
{ title: "Chief Risk & Compliance Officer of the Year", subtitle: "Forex Expo Dubai 2025" },
|
|
6125
|
+
{ title: "Best Broker - APAC", subtitle: "UF Awards 2025" },
|
|
6126
|
+
{ title: "Best Trading Conditions - Global", subtitle: "Finance Magnates 2025" },
|
|
6127
|
+
{ title: "Most Trusted Broker - Middle East", subtitle: "Finance Magnates 2025" },
|
|
6128
|
+
{ title: "Affiliate Program of the Year", subtitle: "Forex Expo Dubai 2024" },
|
|
6129
|
+
{ title: "Best Customer Service - Global", subtitle: "Global Forex Awards 2024" },
|
|
6130
|
+
{ title: "Most Trusted Broker - Africa", subtitle: "Finance Magnates 2024" },
|
|
6131
|
+
{ title: "Best LATAM Region Broker", subtitle: "ADVFN Awards 2024" },
|
|
6132
|
+
{ title: "Broker of the Year - Global", subtitle: "Finance Magnates 2024" }
|
|
6133
|
+
];
|
|
6134
|
+
var LaurelIcon = ({ side }) => /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
6135
|
+
"img",
|
|
6136
|
+
{
|
|
6137
|
+
className: `fa__leaf fa__leaf--${side}`,
|
|
6138
|
+
src: side === "left" ? award_leaf_left_default : award_leaf_right_default,
|
|
6139
|
+
alt: "",
|
|
6140
|
+
"aria-hidden": "true",
|
|
6141
|
+
loading: "lazy",
|
|
6142
|
+
draggable: false
|
|
6143
|
+
}
|
|
6144
|
+
);
|
|
6145
|
+
var AwardBadge2 = ({ award }) => /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("div", { className: "fa__item", role: "listitem", children: [
|
|
6146
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(LaurelIcon, { side: "left" }),
|
|
6147
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("div", { className: "fa__item-text", children: [
|
|
6148
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)("p", { className: "fa__item-title", children: award.title }),
|
|
6149
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)("p", { className: "fa__item-subtitle", children: award.subtitle })
|
|
6150
|
+
] }),
|
|
6151
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(LaurelIcon, { side: "right" })
|
|
6152
|
+
] });
|
|
6153
|
+
var FeatureAwards = ({
|
|
6154
|
+
title = FEATURE_AWARDS_TEXT_CONTENT.title,
|
|
6155
|
+
awards = DEFAULT_AWARDS,
|
|
6156
|
+
autoScrollDuration = 32,
|
|
6157
|
+
className,
|
|
6158
|
+
...props
|
|
6159
|
+
}) => {
|
|
6160
|
+
if (!awards || awards.length === 0) return null;
|
|
6161
|
+
const trackStyle = {
|
|
6162
|
+
"--fa-duration": `${autoScrollDuration}s`
|
|
6163
|
+
};
|
|
6164
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
6165
|
+
"section",
|
|
6166
|
+
{
|
|
6167
|
+
className: ["fa", className].filter(Boolean).join(" "),
|
|
6168
|
+
...props,
|
|
6169
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("div", { className: "fa__inner", children: [
|
|
6170
|
+
title && /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("h2", { className: "fa__title", children: title }),
|
|
6171
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)("div", { className: "fa__grid", role: "list", children: awards.map((award, i) => /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(AwardBadge2, { award }, `g-${i}`)) }),
|
|
6172
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)("div", { className: "fa__scroller", children: /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("div", { className: "fa__track fa__track--auto", style: trackStyle, children: [
|
|
6173
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)("div", { className: "fa__track-group", role: "list", children: awards.map((award, i) => /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(AwardBadge2, { award }, `m-${i}`)) }),
|
|
6174
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
6175
|
+
"div",
|
|
6176
|
+
{
|
|
6177
|
+
className: "fa__track-group",
|
|
6178
|
+
role: "presentation",
|
|
6179
|
+
"aria-hidden": "true",
|
|
6180
|
+
children: awards.map((award, i) => /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(AwardBadge2, { award }, `m-dup-${i}`))
|
|
6181
|
+
}
|
|
6182
|
+
)
|
|
6183
|
+
] }) })
|
|
6184
|
+
] })
|
|
6185
|
+
}
|
|
6186
|
+
);
|
|
6187
|
+
};
|
|
6188
|
+
|
|
6189
|
+
// templates/FeatureBlog/FeatureBlog.tsx
|
|
6190
|
+
var import_jsx_runtime48 = require("react/jsx-runtime");
|
|
6191
|
+
var externalLinkRel2 = (href) => href && /^https?:\/\//i.test(href) ? "noopener noreferrer" : void 0;
|
|
6192
|
+
var FEATURE_BLOG_TEXT_CONTENT = {
|
|
6193
|
+
title: "Deriv press releases",
|
|
6194
|
+
linkText: "See all press releases"
|
|
6195
|
+
};
|
|
6196
|
+
var PostCard = ({ post, index }) => {
|
|
6197
|
+
const tags = [post.date, post.category].filter((value) => Boolean(value)).map((label) => ({ label }));
|
|
6198
|
+
const card = /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
6199
|
+
Card,
|
|
6200
|
+
{
|
|
6201
|
+
hideAvatar: true,
|
|
6202
|
+
layout: "vertical",
|
|
6203
|
+
showCopyLink: false,
|
|
6204
|
+
summary: post.summary,
|
|
6205
|
+
tags,
|
|
6206
|
+
thumbnail: post.thumbnail,
|
|
6207
|
+
thumbnailAlt: post.thumbnailAlt,
|
|
6208
|
+
title: post.title,
|
|
6209
|
+
type: "article",
|
|
6210
|
+
variant: "thumbnail"
|
|
6211
|
+
}
|
|
6212
|
+
);
|
|
6213
|
+
if (post.href) {
|
|
6214
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
6215
|
+
"a",
|
|
6216
|
+
{
|
|
6217
|
+
className: "fb-cardLink",
|
|
6218
|
+
href: post.href,
|
|
6219
|
+
rel: externalLinkRel2(post.href),
|
|
6220
|
+
children: card
|
|
6221
|
+
},
|
|
6222
|
+
`${post.title}-${index}`
|
|
6223
|
+
);
|
|
6224
|
+
}
|
|
6225
|
+
if (post.onClick) {
|
|
6226
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
6227
|
+
"button",
|
|
6228
|
+
{
|
|
6229
|
+
className: "fb-cardLink fb-cardButton",
|
|
6230
|
+
onClick: post.onClick,
|
|
6231
|
+
type: "button",
|
|
6232
|
+
children: card
|
|
6233
|
+
},
|
|
6234
|
+
`${post.title}-${index}`
|
|
6235
|
+
);
|
|
6236
|
+
}
|
|
6237
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("div", { children: card }, `${post.title}-${index}`);
|
|
6238
|
+
};
|
|
6239
|
+
var FeatureBlog = ({
|
|
6240
|
+
title = FEATURE_BLOG_TEXT_CONTENT.title,
|
|
6241
|
+
posts,
|
|
6242
|
+
showLink = true,
|
|
6243
|
+
linkText = FEATURE_BLOG_TEXT_CONTENT.linkText,
|
|
6244
|
+
linkHref,
|
|
6245
|
+
onLinkClick,
|
|
6246
|
+
className,
|
|
6247
|
+
...props
|
|
6248
|
+
}) => {
|
|
6249
|
+
if (!posts || posts.length === 0) return null;
|
|
6250
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("section", { className: ["fb-section", className ?? ""].filter(Boolean).join(" "), ...props, children: /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("div", { className: "fb-container", children: [
|
|
6251
|
+
title && /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("h2", { className: "fb-title", children: title }),
|
|
6252
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)("div", { className: "fb-grid", children: posts.map((post, index) => /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(PostCard, { index, post }, `${post.title}-${index}`)) }),
|
|
6253
|
+
showLink && /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("div", { className: "fb-linkWrap", children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
6254
|
+
Link,
|
|
6255
|
+
{
|
|
6256
|
+
colorScheme: "coral",
|
|
6257
|
+
href: linkHref,
|
|
6258
|
+
label: linkText,
|
|
6259
|
+
rel: externalLinkRel2(linkHref),
|
|
6260
|
+
onClick: onLinkClick
|
|
6261
|
+
}
|
|
6262
|
+
) })
|
|
6263
|
+
] }) });
|
|
6264
|
+
};
|
|
6265
|
+
|
|
6266
|
+
// templates/FeatureBlogCategories/FeatureBlogCategories.tsx
|
|
6267
|
+
var import_react25 = require("react");
|
|
6268
|
+
var import_jsx_runtime49 = require("react/jsx-runtime");
|
|
6269
|
+
var isExternalUrl = (href) => Boolean(href && /^https?:\/\//i.test(href));
|
|
6270
|
+
var FEATURE_BLOG_CATEGORIES_TEXT_CONTENT = {
|
|
6271
|
+
title: "Deriv press releases",
|
|
6272
|
+
allCategoryId: "all",
|
|
6273
|
+
allCategoryLabel: "View all",
|
|
6274
|
+
searchPlaceholder: "Search",
|
|
6275
|
+
emptyStateText: "Sorry, we couldn't find any results matching."
|
|
6276
|
+
};
|
|
6277
|
+
var PostCard2 = ({
|
|
6278
|
+
post,
|
|
6279
|
+
categoryLabel
|
|
6280
|
+
}) => {
|
|
6281
|
+
const tags = [post.date, categoryLabel].filter((value) => Boolean(value)).map((label) => ({ label }));
|
|
6282
|
+
const card = /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
6283
|
+
Card,
|
|
6284
|
+
{
|
|
6285
|
+
hideAvatar: true,
|
|
6286
|
+
layout: "vertical",
|
|
6287
|
+
showCopyLink: false,
|
|
6288
|
+
summary: post.summary,
|
|
6289
|
+
tags,
|
|
6290
|
+
thumbnail: post.thumbnail,
|
|
6291
|
+
thumbnailAlt: post.thumbnailAlt,
|
|
6292
|
+
title: post.title,
|
|
6293
|
+
type: "article",
|
|
6294
|
+
variant: "thumbnail"
|
|
6295
|
+
}
|
|
6296
|
+
);
|
|
6297
|
+
if (post.href) {
|
|
6298
|
+
const external = isExternalUrl(post.href);
|
|
6299
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
6300
|
+
"a",
|
|
6301
|
+
{
|
|
6302
|
+
className: "fbc-cardLink",
|
|
6303
|
+
href: post.href,
|
|
6304
|
+
rel: external ? "noopener noreferrer" : void 0,
|
|
6305
|
+
target: external ? "_blank" : void 0,
|
|
6306
|
+
children: card
|
|
6307
|
+
}
|
|
6308
|
+
);
|
|
6309
|
+
}
|
|
6310
|
+
if (post.onClick) {
|
|
6311
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("button", { className: "fbc-cardLink fbc-cardButton", onClick: post.onClick, type: "button", children: card });
|
|
6312
|
+
}
|
|
6313
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("div", { children: card });
|
|
6314
|
+
};
|
|
6315
|
+
var FeatureBlogCategories = ({
|
|
6316
|
+
title = FEATURE_BLOG_CATEGORIES_TEXT_CONTENT.title,
|
|
6317
|
+
categories,
|
|
6318
|
+
allCategoryId = FEATURE_BLOG_CATEGORIES_TEXT_CONTENT.allCategoryId,
|
|
6319
|
+
allCategoryLabel = FEATURE_BLOG_CATEGORIES_TEXT_CONTENT.allCategoryLabel,
|
|
6320
|
+
activeCategoryId,
|
|
6321
|
+
defaultActiveCategoryId,
|
|
6322
|
+
onCategoryChange,
|
|
6323
|
+
posts,
|
|
6324
|
+
searchPlaceholder = FEATURE_BLOG_CATEGORIES_TEXT_CONTENT.searchPlaceholder,
|
|
6325
|
+
searchAriaLabel,
|
|
6326
|
+
onSearchChange,
|
|
6327
|
+
emptyStateText = FEATURE_BLOG_CATEGORIES_TEXT_CONTENT.emptyStateText,
|
|
6328
|
+
className,
|
|
6329
|
+
...props
|
|
6330
|
+
}) => {
|
|
6331
|
+
const [search, setSearch] = (0, import_react25.useState)("");
|
|
6332
|
+
const [internalActiveId, setInternalActiveId] = (0, import_react25.useState)(defaultActiveCategoryId ?? allCategoryId);
|
|
6333
|
+
const isControlled = activeCategoryId !== void 0;
|
|
6334
|
+
const activeId = isControlled ? activeCategoryId : internalActiveId;
|
|
6335
|
+
const tabs = (0, import_react25.useMemo)(
|
|
6336
|
+
() => [{ id: allCategoryId, label: allCategoryLabel }, ...categories],
|
|
6337
|
+
[allCategoryId, allCategoryLabel, categories]
|
|
6338
|
+
);
|
|
6339
|
+
const categoryLabelById = (0, import_react25.useMemo)(() => {
|
|
6340
|
+
const map = /* @__PURE__ */ new Map();
|
|
6341
|
+
categories.forEach((category) => map.set(category.id, category.label));
|
|
6342
|
+
return map;
|
|
6343
|
+
}, [categories]);
|
|
6344
|
+
const filteredPosts = (0, import_react25.useMemo)(() => {
|
|
6345
|
+
const query = search.trim().toLowerCase();
|
|
6346
|
+
return posts.filter((post) => {
|
|
6347
|
+
const matchesCategory = activeId === allCategoryId || post.category === activeId;
|
|
6348
|
+
if (!matchesCategory) return false;
|
|
6349
|
+
if (!query) return true;
|
|
6350
|
+
return post.title.toLowerCase().includes(query) || post.summary.toLowerCase().includes(query);
|
|
6351
|
+
});
|
|
6352
|
+
}, [posts, activeId, allCategoryId, search]);
|
|
6353
|
+
const handleTabChange = (id) => {
|
|
6354
|
+
if (!isControlled) setInternalActiveId(id);
|
|
6355
|
+
onCategoryChange?.(id);
|
|
6356
|
+
};
|
|
6357
|
+
const handleSearchChange = (e) => {
|
|
6358
|
+
setSearch(e.target.value);
|
|
6359
|
+
onSearchChange?.(e.target.value);
|
|
6360
|
+
};
|
|
6361
|
+
const handleSearchClear = () => {
|
|
6362
|
+
setSearch("");
|
|
6363
|
+
onSearchChange?.("");
|
|
6364
|
+
};
|
|
6365
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("section", { className: ["fbc-section", className ?? ""].filter(Boolean).join(" "), ...props, children: /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: "fbc-container", children: [
|
|
6366
|
+
title && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("h2", { className: "fbc-title", children: title }),
|
|
6367
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)("div", { className: "fbc-searchWrap", children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
6368
|
+
SearchField,
|
|
6369
|
+
{
|
|
6370
|
+
"aria-label": searchAriaLabel ?? searchPlaceholder,
|
|
6371
|
+
onChange: handleSearchChange,
|
|
6372
|
+
onClear: handleSearchClear,
|
|
6373
|
+
placeholder: searchPlaceholder,
|
|
6374
|
+
value: search,
|
|
6375
|
+
variant: "outline"
|
|
6376
|
+
}
|
|
6377
|
+
) }),
|
|
6378
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)("div", { className: "fbc-tabsWrap", children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(Tabs, { activeId: activeId ?? allCategoryId, items: tabs, onChange: handleTabChange }) }),
|
|
6379
|
+
filteredPosts.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("div", { className: "fbc-grid", children: filteredPosts.map((post, index) => /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
6380
|
+
PostCard2,
|
|
6381
|
+
{
|
|
6382
|
+
categoryLabel: post.categoryLabel ?? categoryLabelById.get(post.category),
|
|
6383
|
+
post
|
|
6384
|
+
},
|
|
6385
|
+
`${post.title}-${index}`
|
|
6386
|
+
)) }) : /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("p", { className: "fbc-emptyState", children: emptyStateText })
|
|
6387
|
+
] }) });
|
|
6388
|
+
};
|
|
6389
|
+
|
|
6390
|
+
// templates/HelpCentreCategories/HelpCentreCategories.tsx
|
|
6391
|
+
var import_jsx_runtime50 = require("react/jsx-runtime");
|
|
6392
|
+
var externalLinkRel3 = (href) => href && /^https?:\/\//i.test(href) ? "noopener noreferrer" : void 0;
|
|
6393
|
+
var CategoryTileContent = ({ category }) => /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(import_jsx_runtime50.Fragment, { children: [
|
|
6394
|
+
category.icon && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("span", { className: "hcc-tile-icon", children: typeof category.icon === "string" ? /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
6395
|
+
"img",
|
|
6396
|
+
{
|
|
6397
|
+
alt: category.iconAlt ?? "",
|
|
6398
|
+
className: "hcc-tile-iconImage",
|
|
6399
|
+
decoding: "async",
|
|
6400
|
+
height: 48,
|
|
6401
|
+
loading: "lazy",
|
|
6402
|
+
src: category.icon,
|
|
6403
|
+
width: 48
|
|
6404
|
+
}
|
|
6405
|
+
) : category.icon }),
|
|
6406
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)("span", { className: "hcc-tile-title", children: category.title })
|
|
6407
|
+
] });
|
|
6408
|
+
var CategoryTile = ({ category }) => {
|
|
6409
|
+
if (category.href) {
|
|
6410
|
+
return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
6411
|
+
"a",
|
|
6412
|
+
{
|
|
6413
|
+
className: "hcc-tile",
|
|
6414
|
+
href: category.href,
|
|
6415
|
+
onClick: category.onClick,
|
|
6416
|
+
rel: externalLinkRel3(category.href),
|
|
6417
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(CategoryTileContent, { category })
|
|
6418
|
+
}
|
|
6419
|
+
);
|
|
6420
|
+
}
|
|
6421
|
+
return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("button", { className: "hcc-tile", onClick: category.onClick, type: "button", children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(CategoryTileContent, { category }) });
|
|
6422
|
+
};
|
|
6423
|
+
var getColumnCount = (categoryCount) => Math.max(1, Math.min(categoryCount, 3));
|
|
6424
|
+
var HelpCentreCategories = ({
|
|
6425
|
+
sectionTitle,
|
|
6426
|
+
sectionDescription,
|
|
6427
|
+
categories
|
|
6428
|
+
}) => {
|
|
6429
|
+
const columnCount = getColumnCount(categories.length);
|
|
6430
|
+
return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("section", { className: "hcc-section", children: /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)("div", { className: "hcc-container", children: [
|
|
6431
|
+
(sectionTitle || sectionDescription) && /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)("div", { className: "hcc-header", children: [
|
|
6432
|
+
sectionTitle && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("h2", { className: "hcc-sectionTitle", children: sectionTitle }),
|
|
6433
|
+
sectionDescription && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("p", { className: "hcc-sectionDescription", children: sectionDescription })
|
|
6434
|
+
] }),
|
|
6435
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)("div", { className: `hcc-grid hcc-grid--${columnCount}`, role: "list", children: categories.map((category, index) => /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("div", { className: "hcc-gridItem", role: "listitem", children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(CategoryTile, { category }) }, category.id ?? `${category.title}-${index}`)) })
|
|
6436
|
+
] }) });
|
|
6437
|
+
};
|
|
6438
|
+
|
|
6439
|
+
// templates/HelpCentreSubCategories/HelpCentreSubCategories.tsx
|
|
6440
|
+
var import_react26 = require("react");
|
|
6441
|
+
var import_jsx_runtime51 = require("react/jsx-runtime");
|
|
6442
|
+
var externalLinkRel4 = (href) => href && /^https?:\/\//i.test(href) ? "noopener noreferrer" : void 0;
|
|
6443
|
+
var QuestionCard = ({ item }) => {
|
|
6444
|
+
if (item.href) {
|
|
6445
|
+
return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("a", { className: "hcsc-card", href: item.href, onClick: item.onClick, rel: externalLinkRel4(item.href), children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("span", { className: "hcsc-card-text", children: item.question }) });
|
|
6446
|
+
}
|
|
6447
|
+
return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("button", { className: "hcsc-card", onClick: item.onClick, type: "button", children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("span", { className: "hcsc-card-text", children: item.question }) });
|
|
6448
|
+
};
|
|
6449
|
+
var HelpCentreSubCategories = ({
|
|
6450
|
+
title,
|
|
6451
|
+
searchPlaceholder = "Search",
|
|
6452
|
+
searchAriaLabel,
|
|
6453
|
+
items,
|
|
6454
|
+
noResultsText = 'No results found for "{query}"',
|
|
6455
|
+
onSearchChange
|
|
6456
|
+
}) => {
|
|
6457
|
+
const [search, setSearch] = (0, import_react26.useState)("");
|
|
6458
|
+
const filtered = (0, import_react26.useMemo)(() => {
|
|
6459
|
+
const q = search.trim().toLowerCase();
|
|
6460
|
+
if (!q) return items;
|
|
6461
|
+
return items.filter((item) => item.question.toLowerCase().includes(q));
|
|
6462
|
+
}, [items, search]);
|
|
6463
|
+
const handleSearchChange = (e) => {
|
|
6464
|
+
setSearch(e.target.value);
|
|
6465
|
+
onSearchChange?.(e.target.value);
|
|
6466
|
+
};
|
|
6467
|
+
const handleClear = () => {
|
|
6468
|
+
setSearch("");
|
|
6469
|
+
onSearchChange?.("");
|
|
6470
|
+
};
|
|
6471
|
+
return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("section", { className: "hcsc-section", children: /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("div", { className: "hcsc-container", children: [
|
|
6472
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)("h1", { className: "hcsc-title", children: title }),
|
|
6473
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)("div", { className: "hcsc-searchWrap", children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
6474
|
+
SearchField,
|
|
6475
|
+
{
|
|
6476
|
+
"aria-label": searchAriaLabel ?? searchPlaceholder,
|
|
6477
|
+
onChange: handleSearchChange,
|
|
6478
|
+
onClear: handleClear,
|
|
6479
|
+
placeholder: searchPlaceholder,
|
|
6480
|
+
value: search,
|
|
6481
|
+
variant: "outline"
|
|
6482
|
+
}
|
|
6483
|
+
) }),
|
|
6484
|
+
filtered.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("div", { className: "hcsc-grid", role: "list", children: filtered.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("div", { className: "hcsc-gridItem", role: "listitem", children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(QuestionCard, { item }) }, item.id ?? `${item.question}-${index}`)) }) : /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("p", { className: "hcsc-noResults", children: noResultsText.replace("{query}", search) })
|
|
6485
|
+
] }) });
|
|
6486
|
+
};
|
|
6487
|
+
|
|
6488
|
+
// templates/HelpCenterPage/HelpCenterPage.tsx
|
|
6489
|
+
var import_react27 = require("react");
|
|
6490
|
+
var import_jsx_runtime52 = require("react/jsx-runtime");
|
|
6491
|
+
var externalLinkRel5 = (href) => href && /^https?:\/\//i.test(href) ? "noopener noreferrer" : void 0;
|
|
6492
|
+
var ChevronDownIcon5 = () => /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("svg", { "aria-hidden": "true", fill: "none", height: "16", viewBox: "0 0 16 16", width: "16", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("path", { d: "M4 6l4 4 4-4", stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "1.5" }) });
|
|
6493
|
+
var renderBlock = (block, index) => {
|
|
6494
|
+
if (block.type === "heading") {
|
|
6495
|
+
const HeadingTag = block.level === 3 ? "h3" : "h2";
|
|
6496
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(HeadingTag, { className: "hcp-blockHeading", children: block.text }, index);
|
|
6497
|
+
}
|
|
6498
|
+
if (block.type === "list") {
|
|
6499
|
+
const ListTag = block.ordered ? "ol" : "ul";
|
|
6500
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(ListTag, { className: "hcp-blockList", children: (block.items ?? []).map((item, i) => /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("li", { className: "hcp-blockListItem", children: item }, i)) }, index);
|
|
6501
|
+
}
|
|
6502
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("p", { className: "hcp-blockParagraph", children: block.text }, index);
|
|
6503
|
+
};
|
|
6504
|
+
var QuestionRow = ({
|
|
6505
|
+
item,
|
|
6506
|
+
isActive,
|
|
6507
|
+
onSelect
|
|
6508
|
+
}) => {
|
|
6509
|
+
const rowClass = ["hcp-row", isActive ? "hcp-row--active" : ""].filter(Boolean).join(" ");
|
|
6510
|
+
if (item.href) {
|
|
6511
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
6512
|
+
"a",
|
|
6513
|
+
{
|
|
6514
|
+
"aria-current": isActive ? "page" : void 0,
|
|
6515
|
+
className: rowClass,
|
|
6516
|
+
href: item.href,
|
|
6517
|
+
onClick: () => {
|
|
6518
|
+
item.onClick?.();
|
|
6519
|
+
onSelect(item);
|
|
6520
|
+
},
|
|
6521
|
+
rel: externalLinkRel5(item.href),
|
|
6522
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("span", { className: "hcp-rowText", children: item.question })
|
|
6523
|
+
}
|
|
6524
|
+
);
|
|
6525
|
+
}
|
|
6526
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
6527
|
+
"button",
|
|
6528
|
+
{
|
|
6529
|
+
"aria-current": isActive ? "page" : void 0,
|
|
6530
|
+
className: rowClass,
|
|
6531
|
+
onClick: () => {
|
|
6532
|
+
item.onClick?.();
|
|
6533
|
+
onSelect(item);
|
|
6534
|
+
},
|
|
6535
|
+
type: "button",
|
|
6536
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("span", { className: "hcp-rowText", children: item.question })
|
|
6537
|
+
}
|
|
6538
|
+
);
|
|
6539
|
+
};
|
|
6540
|
+
var HelpCenterPage = ({
|
|
6541
|
+
categoryTitle,
|
|
6542
|
+
questions,
|
|
6543
|
+
activeQuestionId,
|
|
6544
|
+
defaultActiveQuestionId,
|
|
6545
|
+
onQuestionSelect,
|
|
6546
|
+
contentTitle,
|
|
6547
|
+
content,
|
|
6548
|
+
searchPlaceholder = "Search",
|
|
6549
|
+
searchAriaLabel,
|
|
6550
|
+
onSearchChange,
|
|
6551
|
+
searchNoResultsText = 'No results found for "{query}"',
|
|
6552
|
+
articlesSheetTitle = "Articles in this section",
|
|
6553
|
+
className
|
|
6554
|
+
}) => {
|
|
6555
|
+
const [search, setSearch] = (0, import_react27.useState)("");
|
|
6556
|
+
const [internalActiveId, setInternalActiveId] = (0, import_react27.useState)(defaultActiveQuestionId ?? questions[0]?.id);
|
|
6557
|
+
const [sheetOpen, setSheetOpen] = (0, import_react27.useState)(false);
|
|
6558
|
+
const isControlled = activeQuestionId !== void 0;
|
|
6559
|
+
const activeId = isControlled ? activeQuestionId : internalActiveId;
|
|
6560
|
+
const activeItem = questions.find((item) => item.id === activeId);
|
|
6561
|
+
const filtered = (0, import_react27.useMemo)(() => {
|
|
6562
|
+
const q = search.trim().toLowerCase();
|
|
6563
|
+
if (!q) return questions;
|
|
6564
|
+
return questions.filter((item) => item.question.toLowerCase().includes(q));
|
|
6565
|
+
}, [questions, search]);
|
|
6566
|
+
const handleSearchChange = (e) => {
|
|
6567
|
+
setSearch(e.target.value);
|
|
6568
|
+
onSearchChange?.(e.target.value);
|
|
6569
|
+
};
|
|
6570
|
+
const handleClear = () => {
|
|
6571
|
+
setSearch("");
|
|
6572
|
+
onSearchChange?.("");
|
|
6573
|
+
};
|
|
6574
|
+
const handleSelect = (item) => {
|
|
6575
|
+
if (!isControlled) setInternalActiveId(item.id);
|
|
6576
|
+
onQuestionSelect?.(item.id);
|
|
6577
|
+
setSheetOpen(false);
|
|
6578
|
+
};
|
|
6579
|
+
const resolvedTitle = activeItem?.content ? activeItem.contentTitle ?? contentTitle : contentTitle;
|
|
6580
|
+
const resolvedContent = activeItem?.content ?? content;
|
|
6581
|
+
const rootClass = ["hcp-section", className ?? ""].filter(Boolean).join(" ");
|
|
6582
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("section", { className: rootClass, children: [
|
|
6583
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { className: "hcp-container", children: [
|
|
6584
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)("div", { className: "hcp-searchWrap", children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
6585
|
+
SearchField,
|
|
6586
|
+
{
|
|
6587
|
+
"aria-label": searchAriaLabel ?? searchPlaceholder,
|
|
6588
|
+
onChange: handleSearchChange,
|
|
6589
|
+
onClear: handleClear,
|
|
6590
|
+
placeholder: searchPlaceholder,
|
|
6591
|
+
value: search,
|
|
6592
|
+
variant: "outline"
|
|
6593
|
+
}
|
|
6594
|
+
) }),
|
|
6595
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { className: "hcp-body", children: [
|
|
6596
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)("aside", { className: "hcp-sidebar", children: /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { className: "hcp-sidebarCard", children: [
|
|
6597
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)("h2", { className: "hcp-sidebarTitle", children: categoryTitle }),
|
|
6598
|
+
filtered.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("div", { className: "hcp-list", role: "list", children: filtered.map((item) => /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("div", { className: "hcp-listItem", role: "listitem", children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(QuestionRow, { isActive: item.id === activeId, item, onSelect: handleSelect }) }, item.id)) }) : /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("p", { className: "hcp-noResults", children: searchNoResultsText.replace("{query}", search) })
|
|
6599
|
+
] }) }),
|
|
6600
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(
|
|
6601
|
+
"button",
|
|
6602
|
+
{
|
|
6603
|
+
"aria-expanded": sheetOpen,
|
|
6604
|
+
className: "hcp-mobileToggle",
|
|
6605
|
+
onClick: () => setSheetOpen(true),
|
|
6606
|
+
type: "button",
|
|
6607
|
+
children: [
|
|
6608
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)("span", { className: "hcp-mobileToggleLabel", children: categoryTitle }),
|
|
6609
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)("span", { className: "hcp-mobileToggleChevron", children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(ChevronDownIcon5, {}) })
|
|
6610
|
+
]
|
|
6611
|
+
}
|
|
6612
|
+
),
|
|
6613
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { className: "hcp-content", children: [
|
|
6614
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)("h1", { className: "hcp-contentTitle", children: resolvedTitle }),
|
|
6615
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)("div", { className: "hcp-contentBody", children: resolvedContent.map(renderBlock) })
|
|
6616
|
+
] })
|
|
6617
|
+
] })
|
|
6618
|
+
] }),
|
|
6619
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(BottomSheet, { onClose: () => setSheetOpen(false), open: sheetOpen, title: articlesSheetTitle, children: filtered.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("div", { className: "hcp-sheetList", role: "list", children: filtered.map((item) => /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("div", { className: "hcp-sheetItem", role: "listitem", children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(QuestionRow, { isActive: item.id === activeId, item, onSelect: handleSelect }) }, item.id)) }) : /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("p", { className: "hcp-noResults", children: searchNoResultsText.replace("{query}", search) }) })
|
|
6620
|
+
] });
|
|
6621
|
+
};
|
|
6622
|
+
|
|
6623
|
+
// templates/FeatureBlogPage/FeatureBlogPage.tsx
|
|
6624
|
+
var import_react28 = require("react");
|
|
6625
|
+
|
|
6626
|
+
// assets/share-link.png
|
|
6627
|
+
var share_link_default = "./share-link-QGD6KIDA.png";
|
|
6628
|
+
|
|
6629
|
+
// assets/share-facebook.png
|
|
6630
|
+
var share_facebook_default = "./share-facebook-3B3NOC5Q.png";
|
|
6631
|
+
|
|
6632
|
+
// assets/share-x.png
|
|
6633
|
+
var share_x_default = "./share-x-UTEBBL73.png";
|
|
6634
|
+
|
|
6635
|
+
// assets/share-telegram.png
|
|
6636
|
+
var share_telegram_default = "./share-telegram-QRXGSHQT.png";
|
|
6637
|
+
|
|
6638
|
+
// assets/share-linkedin.png
|
|
6639
|
+
var share_linkedin_default = "./share-linkedin-UCIII3JU.png";
|
|
6640
|
+
|
|
6641
|
+
// templates/FeatureBlogPage/FeatureBlogPage.tsx
|
|
6642
|
+
var import_jsx_runtime53 = require("react/jsx-runtime");
|
|
6643
|
+
var ChevronDownIcon6 = () => /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("svg", { "aria-hidden": "true", fill: "none", height: "16", viewBox: "0 0 16 16", width: "16", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("path", { d: "M4 6l4 4 4-4", stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "1.5" }) });
|
|
6644
|
+
var CheckIcon3 = () => /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("svg", { "aria-hidden": "true", fill: "none", height: "18", viewBox: "0 0 16 16", width: "18", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("path", { d: "M3.5 8.5l3 3 6-7", stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "1.6" }) });
|
|
6645
|
+
var SHARE_ICONS = {
|
|
6646
|
+
facebook: { src: share_facebook_default, alt: "Facebook" },
|
|
6647
|
+
twitter: { src: share_x_default, alt: "X" },
|
|
6648
|
+
linkedin: { src: share_linkedin_default, alt: "LinkedIn" },
|
|
6649
|
+
telegram: { src: share_telegram_default, alt: "Telegram" }
|
|
6650
|
+
};
|
|
6651
|
+
var LABELS = {
|
|
6652
|
+
facebook: "Share on Facebook",
|
|
6653
|
+
twitter: "Share on X",
|
|
6654
|
+
linkedin: "Share on LinkedIn",
|
|
6655
|
+
telegram: "Share on Telegram"
|
|
6656
|
+
};
|
|
6657
|
+
var slugify = (text) => text.toLowerCase().trim().replace(/[^a-z0-9\s-]/g, "").replace(/\s+/g, "-").replace(/-+/g, "-").replace(/^-|-$/g, "");
|
|
6658
|
+
function shareHref(platform, url, text) {
|
|
6659
|
+
const encodedUrl = encodeURIComponent(url);
|
|
6660
|
+
const encodedText = encodeURIComponent(text);
|
|
6661
|
+
switch (platform) {
|
|
6662
|
+
case "facebook":
|
|
6663
|
+
return `https://www.facebook.com/sharer/sharer.php?u=${encodedUrl}`;
|
|
6664
|
+
case "twitter":
|
|
6665
|
+
return `https://twitter.com/intent/tweet?url=${encodedUrl}&text=${encodedText}`;
|
|
6666
|
+
case "linkedin":
|
|
6667
|
+
return `https://www.linkedin.com/sharing/share-offsite/?url=${encodedUrl}`;
|
|
6668
|
+
case "telegram":
|
|
6669
|
+
return `https://t.me/share/url?url=${encodedUrl}&text=${encodedText}`;
|
|
6670
|
+
}
|
|
6671
|
+
}
|
|
6672
|
+
var TocCard = ({
|
|
6673
|
+
tocTitle,
|
|
6674
|
+
headings,
|
|
6675
|
+
activeId,
|
|
6676
|
+
defaultOpen,
|
|
6677
|
+
onNavigate,
|
|
6678
|
+
idSuffix,
|
|
6679
|
+
collapsible
|
|
6680
|
+
}) => {
|
|
6681
|
+
const [open, setOpen] = (0, import_react28.useState)(defaultOpen);
|
|
6682
|
+
const panelId = `fbp-toc-panel-${idSuffix}`;
|
|
6683
|
+
const isOpen = collapsible ? open : true;
|
|
6684
|
+
const list = /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("ol", { className: "fbp-tocList", id: panelId, children: headings.map((heading) => /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("li", { className: "fbp-tocItem", children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
6685
|
+
"a",
|
|
6686
|
+
{
|
|
6687
|
+
"aria-current": activeId === heading.id ? "location" : void 0,
|
|
6688
|
+
className: ["fbp-tocLink", activeId === heading.id ? "fbp-tocLink--active" : ""].filter(Boolean).join(" "),
|
|
6689
|
+
href: `#${heading.id}`,
|
|
6690
|
+
onClick: (e) => {
|
|
6691
|
+
e.preventDefault();
|
|
6692
|
+
onNavigate(heading.id);
|
|
6693
|
+
},
|
|
6694
|
+
children: heading.text
|
|
6695
|
+
}
|
|
6696
|
+
) }, heading.id)) });
|
|
6697
|
+
return /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("div", { className: "fbp-tocCard", children: [
|
|
6698
|
+
collapsible ? /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(
|
|
6699
|
+
"button",
|
|
6700
|
+
{
|
|
6701
|
+
"aria-controls": panelId,
|
|
6702
|
+
"aria-expanded": isOpen,
|
|
6703
|
+
className: "fbp-tocHeader fbp-tocHeader--button",
|
|
6704
|
+
onClick: () => setOpen((prev) => !prev),
|
|
6705
|
+
type: "button",
|
|
6706
|
+
children: [
|
|
6707
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)("span", { className: "fbp-tocTitle", children: tocTitle }),
|
|
6708
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)("span", { className: ["fbp-tocChevron", isOpen ? "fbp-tocChevron--open" : ""].filter(Boolean).join(" "), children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(ChevronDownIcon6, {}) })
|
|
6709
|
+
]
|
|
6710
|
+
}
|
|
6711
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("div", { className: "fbp-tocHeader", children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("span", { className: "fbp-tocTitle", children: tocTitle }) }),
|
|
6712
|
+
isOpen && list
|
|
6713
|
+
] });
|
|
6714
|
+
};
|
|
6715
|
+
var ShareRow = ({
|
|
6716
|
+
shareTitle,
|
|
6717
|
+
shareUrl,
|
|
6718
|
+
shareText,
|
|
6719
|
+
platforms,
|
|
6720
|
+
onShare,
|
|
6721
|
+
copiedLabel
|
|
6722
|
+
}) => {
|
|
6723
|
+
const [copied, setCopied] = (0, import_react28.useState)(false);
|
|
6724
|
+
const handleCopy = async () => {
|
|
6725
|
+
onShare?.("copy");
|
|
6726
|
+
try {
|
|
6727
|
+
if (typeof navigator !== "undefined" && navigator.clipboard?.writeText) {
|
|
6728
|
+
await navigator.clipboard.writeText(shareUrl);
|
|
6729
|
+
setCopied(true);
|
|
6730
|
+
window.setTimeout(() => setCopied(false), 2e3);
|
|
6731
|
+
}
|
|
6732
|
+
} catch {
|
|
6733
|
+
}
|
|
6734
|
+
};
|
|
6735
|
+
return /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("div", { className: "fbp-shareCard", children: [
|
|
6736
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)("span", { className: "fbp-shareTitle", children: shareTitle }),
|
|
6737
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("div", { className: "fbp-shareIcons", children: [
|
|
6738
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
6739
|
+
"button",
|
|
6740
|
+
{
|
|
6741
|
+
"aria-label": copied ? copiedLabel : "Copy link",
|
|
6742
|
+
className: "fbp-shareIcon",
|
|
6743
|
+
onClick: handleCopy,
|
|
6744
|
+
type: "button",
|
|
6745
|
+
children: copied ? /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(CheckIcon3, {}) : /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("img", { alt: "", className: "fbp-shareIconImg", src: share_link_default })
|
|
6746
|
+
}
|
|
6747
|
+
),
|
|
6748
|
+
platforms.map((platform) => {
|
|
6749
|
+
const icon = SHARE_ICONS[platform];
|
|
6750
|
+
return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
6751
|
+
"a",
|
|
6752
|
+
{
|
|
6753
|
+
"aria-label": LABELS[platform],
|
|
6754
|
+
className: "fbp-shareIcon",
|
|
6755
|
+
href: shareHref(platform, shareUrl, shareText),
|
|
6756
|
+
onClick: () => onShare?.(platform),
|
|
6757
|
+
rel: "noopener noreferrer",
|
|
6758
|
+
target: "_blank",
|
|
6759
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("img", { alt: "", className: "fbp-shareIconImg", src: icon.src })
|
|
6760
|
+
},
|
|
6761
|
+
platform
|
|
6762
|
+
);
|
|
6763
|
+
})
|
|
6764
|
+
] })
|
|
6765
|
+
] });
|
|
6766
|
+
};
|
|
6767
|
+
var renderBlock2 = (block, index, headingIds) => {
|
|
6768
|
+
if (block.type === "heading") {
|
|
6769
|
+
const level = block.level ?? 2;
|
|
6770
|
+
const HeadingTag = level === 3 ? "h3" : "h2";
|
|
6771
|
+
const headingClass = level === 3 ? "fbp-blockHeading fbp-blockHeading--h3" : "fbp-blockHeading";
|
|
6772
|
+
return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(HeadingTag, { className: headingClass, id: headingIds.get(index), children: block.text }, index);
|
|
6773
|
+
}
|
|
6774
|
+
if (block.type === "list") {
|
|
6775
|
+
const ListTag = block.ordered ? "ol" : "ul";
|
|
6776
|
+
return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(ListTag, { className: "fbp-blockList", children: (block.items ?? []).map((item, i) => /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("li", { className: "fbp-blockListItem", children: item }, i)) }, index);
|
|
6777
|
+
}
|
|
6778
|
+
if (block.type === "quote") {
|
|
6779
|
+
return /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("blockquote", { className: "fbp-blockQuote", children: [
|
|
6780
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)("p", { className: "fbp-blockQuoteText", children: block.text }),
|
|
6781
|
+
block.cite && /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("cite", { className: "fbp-blockQuoteCite", children: block.cite })
|
|
6782
|
+
] }, index);
|
|
6783
|
+
}
|
|
6784
|
+
if (block.type === "image") {
|
|
6785
|
+
return /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("figure", { className: "fbp-blockImageWrap", children: [
|
|
6786
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)("img", { alt: block.imageAlt ?? "", className: "fbp-blockImage", src: block.image }),
|
|
6787
|
+
block.caption && /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("figcaption", { className: "fbp-blockCaption", children: block.caption })
|
|
6788
|
+
] }, index);
|
|
6789
|
+
}
|
|
6790
|
+
return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("p", { className: "fbp-blockParagraph", children: block.text }, index);
|
|
6791
|
+
};
|
|
6792
|
+
var FeatureBlogPage = ({
|
|
6793
|
+
category,
|
|
6794
|
+
title,
|
|
6795
|
+
publishDate,
|
|
6796
|
+
author,
|
|
6797
|
+
heroImage,
|
|
6798
|
+
heroImageAlt,
|
|
6799
|
+
content,
|
|
6800
|
+
tocTitle = "Contents",
|
|
6801
|
+
tocDefaultOpen = true,
|
|
6802
|
+
hideToc = false,
|
|
6803
|
+
shareTitle = "Share article",
|
|
6804
|
+
shareUrl,
|
|
6805
|
+
shareText,
|
|
6806
|
+
sharePlatforms = ["facebook", "twitter", "telegram", "linkedin"],
|
|
6807
|
+
hideShare = false,
|
|
6808
|
+
onShare,
|
|
6809
|
+
copiedLabel = "Copied!",
|
|
6810
|
+
className
|
|
6811
|
+
}) => {
|
|
6812
|
+
const headingIds = (0, import_react28.useMemo)(() => {
|
|
6813
|
+
const seen = /* @__PURE__ */ new Map();
|
|
6814
|
+
const ids = /* @__PURE__ */ new Map();
|
|
6815
|
+
content.forEach((block, i) => {
|
|
6816
|
+
if (block.type !== "heading") return;
|
|
6817
|
+
const base = block.id ?? (slugify(block.text ?? "") || `section-${i}`);
|
|
6818
|
+
const count = seen.get(base) ?? 0;
|
|
6819
|
+
seen.set(base, count + 1);
|
|
6820
|
+
ids.set(i, count === 0 ? base : `${base}-${count}`);
|
|
6821
|
+
});
|
|
6822
|
+
return ids;
|
|
6823
|
+
}, [content]);
|
|
6824
|
+
const headings = (0, import_react28.useMemo)(
|
|
6825
|
+
() => content.map((block, i) => ({ block, i })).filter(({ block }) => block.type === "heading" && (block.level ?? 2) === 2).map(({ block, i }) => ({ id: headingIds.get(i), text: block.text ?? "" })),
|
|
6826
|
+
[content, headingIds]
|
|
6827
|
+
);
|
|
6828
|
+
const [activeId, setActiveId] = (0, import_react28.useState)(null);
|
|
6829
|
+
(0, import_react28.useEffect)(() => {
|
|
6830
|
+
if (typeof IntersectionObserver === "undefined" || headings.length === 0) return;
|
|
6831
|
+
const elements = headings.map((heading) => document.getElementById(heading.id)).filter((el) => el !== null);
|
|
6832
|
+
if (elements.length === 0) return;
|
|
6833
|
+
const observer = new IntersectionObserver(
|
|
6834
|
+
(entries) => {
|
|
6835
|
+
const visible = entries.filter((entry) => entry.isIntersecting);
|
|
6836
|
+
if (visible.length === 0) return;
|
|
6837
|
+
const topMost = visible.reduce(
|
|
6838
|
+
(a, b) => a.boundingClientRect.top < b.boundingClientRect.top ? a : b
|
|
6839
|
+
);
|
|
6840
|
+
setActiveId(topMost.target.id);
|
|
6841
|
+
},
|
|
6842
|
+
{ rootMargin: "-112px 0px -70% 0px", threshold: 0 }
|
|
6843
|
+
);
|
|
6844
|
+
elements.forEach((el) => observer.observe(el));
|
|
6845
|
+
return () => observer.disconnect();
|
|
6846
|
+
}, [headings]);
|
|
6847
|
+
const handleNavigate = (id) => {
|
|
6848
|
+
setActiveId(id);
|
|
6849
|
+
const el = document.getElementById(id);
|
|
6850
|
+
if (!el) return;
|
|
6851
|
+
const prefersReducedMotion = typeof window !== "undefined" && window.matchMedia?.("(prefers-reduced-motion: reduce)").matches;
|
|
6852
|
+
el.scrollIntoView({ behavior: prefersReducedMotion ? "auto" : "smooth", block: "start" });
|
|
6853
|
+
};
|
|
6854
|
+
const showToc = !hideToc && headings.length > 0;
|
|
6855
|
+
const showShare = !hideShare && Boolean(shareUrl);
|
|
6856
|
+
const resolvedShareText = shareText ?? title;
|
|
6857
|
+
return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("section", { className: ["fbp-section", className ?? ""].filter(Boolean).join(" "), children: /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("div", { className: "fbp-container", children: [
|
|
6858
|
+
showToc && /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("div", { className: "fbp-tocMobileWrap", children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
6859
|
+
TocCard,
|
|
6860
|
+
{
|
|
6861
|
+
activeId,
|
|
6862
|
+
collapsible: true,
|
|
6863
|
+
defaultOpen: tocDefaultOpen,
|
|
6864
|
+
headings,
|
|
6865
|
+
idSuffix: "mobile",
|
|
6866
|
+
onNavigate: handleNavigate,
|
|
6867
|
+
tocTitle
|
|
6868
|
+
}
|
|
6869
|
+
) }),
|
|
6870
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("div", { className: "fbp-body", children: [
|
|
6871
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("div", { className: "fbp-main", children: [
|
|
6872
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("header", { className: "fbp-header", children: [
|
|
6873
|
+
category && /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(Tag, { label: category, size: "md", variant: "fill" }),
|
|
6874
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)("h1", { className: "fbp-title", children: title }),
|
|
6875
|
+
(publishDate || author) && /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("div", { className: "fbp-meta", children: [
|
|
6876
|
+
author && /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("span", { className: "fbp-metaAuthor", children: [
|
|
6877
|
+
author.avatar && /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
6878
|
+
"img",
|
|
6879
|
+
{
|
|
6880
|
+
alt: author.avatarAlt ?? "",
|
|
6881
|
+
className: "fbp-avatar",
|
|
6882
|
+
src: author.avatar
|
|
6883
|
+
}
|
|
6884
|
+
),
|
|
6885
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)("span", { className: "fbp-authorName", children: author.name })
|
|
6886
|
+
] }),
|
|
6887
|
+
publishDate && /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("span", { className: "fbp-dateChip", children: publishDate })
|
|
6888
|
+
] })
|
|
6889
|
+
] }),
|
|
6890
|
+
heroImage && /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("div", { className: "fbp-heroImageWrap", children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("img", { alt: heroImageAlt ?? "", className: "fbp-heroImage", src: heroImage }) }),
|
|
6891
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)("div", { className: "fbp-content", children: content.map((block, index) => renderBlock2(block, index, headingIds)) }),
|
|
6892
|
+
showShare && /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("div", { className: "fbp-shareMobileWrap", children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
6893
|
+
ShareRow,
|
|
6894
|
+
{
|
|
6895
|
+
copiedLabel,
|
|
6896
|
+
onShare,
|
|
6897
|
+
platforms: sharePlatforms,
|
|
6898
|
+
shareText: resolvedShareText,
|
|
6899
|
+
shareTitle,
|
|
6900
|
+
shareUrl
|
|
6901
|
+
}
|
|
6902
|
+
) })
|
|
6903
|
+
] }),
|
|
6904
|
+
(showToc || showShare) && /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("aside", { className: "fbp-sidebar", children: /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("div", { className: "fbp-sidebarSticky", children: [
|
|
6905
|
+
showToc && /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
6906
|
+
TocCard,
|
|
6907
|
+
{
|
|
6908
|
+
activeId,
|
|
6909
|
+
collapsible: false,
|
|
6910
|
+
defaultOpen: tocDefaultOpen,
|
|
6911
|
+
headings,
|
|
6912
|
+
idSuffix: "desktop",
|
|
6913
|
+
onNavigate: handleNavigate,
|
|
6914
|
+
tocTitle
|
|
6915
|
+
}
|
|
6916
|
+
),
|
|
6917
|
+
showShare && /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
6918
|
+
ShareRow,
|
|
6919
|
+
{
|
|
6920
|
+
copiedLabel,
|
|
6921
|
+
onShare,
|
|
6922
|
+
platforms: sharePlatforms,
|
|
6923
|
+
shareText: resolvedShareText,
|
|
6924
|
+
shareTitle,
|
|
6925
|
+
shareUrl
|
|
6926
|
+
}
|
|
6927
|
+
)
|
|
6928
|
+
] }) })
|
|
6929
|
+
] })
|
|
6930
|
+
] }) });
|
|
6931
|
+
};
|
|
6932
|
+
|
|
6933
|
+
// templates/ParallaxBanner/ParallaxBanner.tsx
|
|
6934
|
+
var import_react29 = require("react");
|
|
6935
|
+
var import_framer_motion5 = require("framer-motion");
|
|
6936
|
+
var import_jsx_runtime54 = require("react/jsx-runtime");
|
|
6937
|
+
var PARALLAX_BANNER_TEXT_CONTENT = {
|
|
6938
|
+
title: "Our culture",
|
|
6939
|
+
description: "We combine human values with AI precision. Collaboration, integrity, and continuous learning guide every project.",
|
|
6940
|
+
ctaLabel: "Culture at Deriv"
|
|
6941
|
+
};
|
|
6942
|
+
var DEFAULT_CULTURE_CARDS = [
|
|
6943
|
+
{
|
|
6944
|
+
title: "Customer focus",
|
|
6945
|
+
description: "We obsess over customers, prioritising measurable user value and using AI to surface insights and tailor experiences, always keeping human judgment central."
|
|
6946
|
+
},
|
|
6947
|
+
{
|
|
6948
|
+
title: "Integrity",
|
|
6949
|
+
description: "We act with candour and accountability. We make clear trade-offs, give honest feedback, and design our AI and data use with ethics and transparency to build trust."
|
|
6950
|
+
},
|
|
6951
|
+
{
|
|
6952
|
+
title: "Teamwork",
|
|
6953
|
+
description: "We move together in cross-functional teams. We share credit, solve problems collaboratively, and welcome diverse perspectives to deliver better outcomes."
|
|
6954
|
+
},
|
|
6955
|
+
{
|
|
6956
|
+
title: "Competence",
|
|
6957
|
+
description: "We hold high standards and keep learning. We pair deep expertise with pragmatic delivery from prototype to production, and we use AI thoughtfully to amplify judgment and scale impact."
|
|
6958
|
+
}
|
|
6959
|
+
];
|
|
6960
|
+
var PLACEHOLDER_IMAGE4 = "https://cdn.prod.website-files.com/68da5c86c91c54f39c86c28a/69b9309379ac08e59ca8210a_1f3f555da9a5cbb13a6fe1bf0d5fe1b6_placeholder-image.webp";
|
|
6961
|
+
var PARALLAX_PX = 36;
|
|
6962
|
+
var PARALLAX_SPRING = { stiffness: 90, damping: 26, restDelta: 1e-3 };
|
|
6963
|
+
var ParallaxBanner = ({
|
|
6964
|
+
variant = "default",
|
|
6965
|
+
title = PARALLAX_BANNER_TEXT_CONTENT.title,
|
|
6966
|
+
description = PARALLAX_BANNER_TEXT_CONTENT.description,
|
|
6967
|
+
ctaLabel = PARALLAX_BANNER_TEXT_CONTENT.ctaLabel,
|
|
6968
|
+
ctaHref,
|
|
6969
|
+
onCtaClick,
|
|
6970
|
+
imageUrl = PLACEHOLDER_IMAGE4,
|
|
6971
|
+
imageAlt = "",
|
|
6972
|
+
cards = DEFAULT_CULTURE_CARDS,
|
|
6973
|
+
enableParallax = true,
|
|
6974
|
+
className,
|
|
6975
|
+
...props
|
|
6976
|
+
}) => {
|
|
6977
|
+
const sectionRef = (0, import_react29.useRef)(null);
|
|
6978
|
+
const prefersReducedMotion = (0, import_framer_motion5.useReducedMotion)();
|
|
6979
|
+
const parallaxActive = enableParallax && !prefersReducedMotion;
|
|
6980
|
+
const showCards = variant !== "banner-only" && cards.length > 0;
|
|
6981
|
+
const { scrollYProgress } = (0, import_framer_motion5.useScroll)({
|
|
6982
|
+
target: sectionRef,
|
|
6983
|
+
offset: ["start end", "end start"]
|
|
6984
|
+
});
|
|
6985
|
+
const smoothProgress = (0, import_framer_motion5.useSpring)(scrollYProgress, PARALLAX_SPRING);
|
|
6986
|
+
const parallaxY = (0, import_framer_motion5.useTransform)(smoothProgress, [0, 1], [-PARALLAX_PX, PARALLAX_PX]);
|
|
6987
|
+
return /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
6988
|
+
"section",
|
|
6989
|
+
{
|
|
6990
|
+
ref: sectionRef,
|
|
6991
|
+
className: [
|
|
6992
|
+
"parallax-banner",
|
|
6993
|
+
variant === "banner-only" ? "parallax-banner--banner-only" : "",
|
|
6994
|
+
className
|
|
6995
|
+
].filter(Boolean).join(" "),
|
|
6996
|
+
...props,
|
|
6997
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)("div", { className: "parallax-banner__inner", children: [
|
|
6998
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsxs)("div", { className: "parallax-banner__card", children: [
|
|
6999
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsxs)("div", { className: "parallax-banner__content", children: [
|
|
7000
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)("h2", { className: "parallax-banner__title", children: title }),
|
|
7001
|
+
description && /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("p", { className: "parallax-banner__description", children: description }),
|
|
7002
|
+
ctaLabel && /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("div", { className: "parallax-banner__actions", children: /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
7003
|
+
Link,
|
|
7004
|
+
{
|
|
7005
|
+
colorScheme: "white",
|
|
7006
|
+
label: ctaLabel,
|
|
7007
|
+
href: ctaHref,
|
|
7008
|
+
onClick: onCtaClick,
|
|
7009
|
+
showChevron: true,
|
|
7010
|
+
className: "parallax-banner__cta-link"
|
|
7011
|
+
}
|
|
7012
|
+
) })
|
|
7013
|
+
] }),
|
|
7014
|
+
imageUrl && /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("div", { className: "parallax-banner__image-wrapper", children: /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
7015
|
+
import_framer_motion5.motion.img,
|
|
7016
|
+
{
|
|
7017
|
+
src: imageUrl,
|
|
7018
|
+
alt: imageAlt,
|
|
7019
|
+
className: "parallax-banner__image",
|
|
7020
|
+
loading: "lazy",
|
|
7021
|
+
style: parallaxActive ? { y: parallaxY } : void 0
|
|
7022
|
+
}
|
|
7023
|
+
) })
|
|
7024
|
+
] }),
|
|
7025
|
+
showCards && /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("div", { className: "parallax-banner__cards", role: "list", children: cards.map((card, index) => /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)(
|
|
7026
|
+
"div",
|
|
7027
|
+
{
|
|
7028
|
+
className: "parallax-banner__card-item",
|
|
7029
|
+
role: "listitem",
|
|
7030
|
+
children: [
|
|
7031
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)("h3", { className: "parallax-banner__card-title", children: card.title }),
|
|
7032
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)("p", { className: "parallax-banner__card-description", children: card.description })
|
|
7033
|
+
]
|
|
7034
|
+
},
|
|
7035
|
+
`${card.title}-${index}`
|
|
7036
|
+
)) })
|
|
7037
|
+
] })
|
|
7038
|
+
}
|
|
7039
|
+
);
|
|
7040
|
+
};
|
|
5641
7041
|
// Annotate the CommonJS export names for ESM import in node:
|
|
5642
7042
|
0 && (module.exports = {
|
|
5643
7043
|
AVATAR_DATA,
|
|
@@ -5650,16 +7050,27 @@ var ArticleSection = ({
|
|
|
5650
7050
|
Button,
|
|
5651
7051
|
COL_ONE_LOGOS,
|
|
5652
7052
|
COL_TWO_LOGOS,
|
|
7053
|
+
CORAL_BANNER_DERIV_SLIDES,
|
|
5653
7054
|
CTABanner,
|
|
5654
7055
|
Card,
|
|
5655
7056
|
Chip,
|
|
5656
7057
|
ChipDropdown,
|
|
7058
|
+
CoralBanner,
|
|
7059
|
+
DEFAULT_AWARDS,
|
|
7060
|
+
DEFAULT_CULTURE_CARDS,
|
|
5657
7061
|
DayNightTransition,
|
|
5658
7062
|
DotLottieInView,
|
|
5659
7063
|
DownloadBadge,
|
|
5660
7064
|
DownloadBanner,
|
|
7065
|
+
FEATURE_AWARDS_TEXT_CONTENT,
|
|
7066
|
+
FEATURE_BLOG_CATEGORIES_TEXT_CONTENT,
|
|
7067
|
+
FEATURE_BLOG_TEXT_CONTENT,
|
|
5661
7068
|
FEATURE_SCROLL_DATA,
|
|
5662
7069
|
FaqAccordion,
|
|
7070
|
+
FeatureAwards,
|
|
7071
|
+
FeatureBlog,
|
|
7072
|
+
FeatureBlogCategories,
|
|
7073
|
+
FeatureBlogPage,
|
|
5663
7074
|
FeatureBullets,
|
|
5664
7075
|
FeatureCards,
|
|
5665
7076
|
FeatureCardsIcon,
|
|
@@ -5667,13 +7078,18 @@ var ArticleSection = ({
|
|
|
5667
7078
|
FeatureSplit,
|
|
5668
7079
|
Footer,
|
|
5669
7080
|
Header,
|
|
7081
|
+
HelpCenterPage,
|
|
7082
|
+
HelpCentreCategories,
|
|
7083
|
+
HelpCentreSubCategories,
|
|
5670
7084
|
Hero,
|
|
5671
7085
|
ImageBanner,
|
|
5672
7086
|
Leaders,
|
|
5673
7087
|
Link,
|
|
5674
7088
|
LogoMarquee,
|
|
5675
7089
|
Navbar,
|
|
7090
|
+
PARALLAX_BANNER_TEXT_CONTENT,
|
|
5676
7091
|
Pagination,
|
|
7092
|
+
ParallaxBanner,
|
|
5677
7093
|
PeopleGrid,
|
|
5678
7094
|
STEPS_DATA,
|
|
5679
7095
|
SearchField,
|