@deriv-web-design/ui 0.0.3 → 0.0.5

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/index.mjs CHANGED
@@ -354,8 +354,115 @@ SearchField.displayName = "SearchField";
354
354
 
355
355
  // primitives/Breadcrumb/Breadcrumb.tsx
356
356
  import { useState as useState3 } from "react";
357
- import { Fragment, jsx as jsx8, jsxs as jsxs8 } from "react/jsx-runtime";
358
- var ChevronRightIcon = () => /* @__PURE__ */ jsx8(
357
+
358
+ // primitives/BottomSheet/BottomSheet.tsx
359
+ import { useEffect, useId } from "react";
360
+ import { createPortal } from "react-dom";
361
+ import { jsx as jsx8, jsxs as jsxs8 } from "react/jsx-runtime";
362
+ var XMarkIcon = () => /* @__PURE__ */ jsx8(
363
+ "svg",
364
+ {
365
+ width: "16",
366
+ height: "16",
367
+ viewBox: "0 0 16 16",
368
+ fill: "none",
369
+ xmlns: "http://www.w3.org/2000/svg",
370
+ "aria-hidden": "true",
371
+ children: /* @__PURE__ */ jsx8(
372
+ "path",
373
+ {
374
+ d: "M3 3l10 10M13 3L3 13",
375
+ stroke: "currentColor",
376
+ strokeWidth: "1.5",
377
+ strokeLinecap: "round"
378
+ }
379
+ )
380
+ }
381
+ );
382
+ var BottomSheet = ({
383
+ open,
384
+ onClose,
385
+ title,
386
+ showHeader = true,
387
+ showHandleBar = true,
388
+ primaryAction,
389
+ secondaryAction,
390
+ children
391
+ }) => {
392
+ const titleId = useId();
393
+ useEffect(() => {
394
+ if (!open) return;
395
+ const handleKeyDown = (e) => {
396
+ if (e.key === "Escape") onClose();
397
+ };
398
+ document.addEventListener("keydown", handleKeyDown);
399
+ return () => document.removeEventListener("keydown", handleKeyDown);
400
+ }, [open, onClose]);
401
+ if (!open || typeof document === "undefined") return null;
402
+ return createPortal(
403
+ /* @__PURE__ */ jsx8(
404
+ "div",
405
+ {
406
+ className: "bs-overlay",
407
+ onClick: onClose,
408
+ "aria-hidden": "true",
409
+ children: /* @__PURE__ */ jsxs8(
410
+ "div",
411
+ {
412
+ className: "bs-sheet",
413
+ role: "dialog",
414
+ "aria-modal": "true",
415
+ "aria-labelledby": title ? titleId : void 0,
416
+ onClick: (e) => e.stopPropagation(),
417
+ children: [
418
+ showHandleBar && /* @__PURE__ */ jsx8("div", { className: "bs-handle-container", children: /* @__PURE__ */ jsx8("div", { className: "bs-handle-bar" }) }),
419
+ showHeader && /* @__PURE__ */ jsxs8("div", { className: "bs-header", children: [
420
+ /* @__PURE__ */ jsx8("div", { className: "bs-header-spacer" }),
421
+ title && /* @__PURE__ */ jsx8("p", { id: titleId, className: "bs-title", children: title }),
422
+ /* @__PURE__ */ jsx8("div", { className: "bs-close-container", children: /* @__PURE__ */ jsx8(
423
+ "button",
424
+ {
425
+ type: "button",
426
+ className: "bs-close-btn",
427
+ onClick: onClose,
428
+ "aria-label": "Close",
429
+ children: /* @__PURE__ */ jsx8(XMarkIcon, {})
430
+ }
431
+ ) })
432
+ ] }),
433
+ children && /* @__PURE__ */ jsx8("div", { className: "bs-body", children }),
434
+ (primaryAction || secondaryAction) && /* @__PURE__ */ jsxs8("div", { className: "bs-actions", children: [
435
+ primaryAction && /* @__PURE__ */ jsx8(
436
+ "button",
437
+ {
438
+ type: "button",
439
+ className: "bs-action-primary",
440
+ onClick: primaryAction.onClick,
441
+ children: primaryAction.label
442
+ }
443
+ ),
444
+ secondaryAction && /* @__PURE__ */ jsx8(
445
+ "button",
446
+ {
447
+ type: "button",
448
+ className: "bs-action-secondary",
449
+ onClick: secondaryAction.onClick,
450
+ children: secondaryAction.label
451
+ }
452
+ )
453
+ ] })
454
+ ]
455
+ }
456
+ )
457
+ }
458
+ ),
459
+ document.body
460
+ );
461
+ };
462
+
463
+ // primitives/Breadcrumb/Breadcrumb.tsx
464
+ import { Fragment, jsx as jsx9, jsxs as jsxs9 } from "react/jsx-runtime";
465
+ var ChevronRightIcon = () => /* @__PURE__ */ jsx9(
359
466
  "svg",
360
467
  {
361
468
  width: "1em",
@@ -364,7 +471,7 @@ var ChevronRightIcon = () => /* @__PURE__ */ jsx8(
364
471
  fill: "none",
365
472
  xmlns: "http://www.w3.org/2000/svg",
366
473
  "aria-hidden": "true",
367
- children: /* @__PURE__ */ jsx8(
474
+ children: /* @__PURE__ */ jsx9(
368
475
  "path",
369
476
  {
370
477
  d: "M6 3.5L10.5 8L6 12.5",
@@ -377,9 +484,9 @@ var ChevronRightIcon = () => /* @__PURE__ */ jsx8(
377
484
  }
378
485
  );
379
486
  function BreadcrumbLink({ item }) {
380
- return /* @__PURE__ */ jsxs8(Fragment, { children: [
381
- /* @__PURE__ */ jsx8("a", { href: item.href, onClick: item.onClick, className: "bc-link", children: item.label }),
382
- /* @__PURE__ */ jsx8("span", { className: "bc-separator", "aria-hidden": "true", children: /* @__PURE__ */ jsx8(ChevronRightIcon, {}) })
487
+ return /* @__PURE__ */ jsxs9(Fragment, { children: [
488
+ /* @__PURE__ */ jsx9("a", { href: item.href, onClick: item.onClick, className: "bc-link", children: item.label }),
489
+ /* @__PURE__ */ jsx9("span", { className: "bc-separator", "aria-hidden": "true", children: /* @__PURE__ */ jsx9(ChevronRightIcon, {}) })
383
490
  ] });
384
491
  }
385
492
  function Breadcrumb({
@@ -389,48 +496,67 @@ function Breadcrumb({
389
496
  className,
390
497
  ...navProps
391
498
  }) {
392
- const [expanded, setExpanded] = useState3(false);
499
+ const [sheetOpen, setSheetOpen] = useState3(false);
393
500
  const truncatable = collapsible && items.length > 3;
394
- const listClass = [
395
- "bc-list",
396
- size,
397
- truncatable ? "collapsible" : "",
398
- truncatable && expanded ? "expanded" : ""
399
- ].filter(Boolean).join(" ");
501
+ const listClass = ["bc-list", size, truncatable ? "collapsible" : ""].filter(Boolean).join(" ");
400
502
  if (!truncatable) {
401
- return /* @__PURE__ */ jsx8("nav", { "aria-label": "Breadcrumb", className, ...navProps, children: /* @__PURE__ */ jsx8("ol", { className: listClass, children: items.map((item, index) => {
503
+ return /* @__PURE__ */ jsx9("nav", { "aria-label": "Breadcrumb", className, ...navProps, children: /* @__PURE__ */ jsx9("ol", { className: listClass, children: items.map((item, index) => {
402
504
  const isLast = index === items.length - 1;
403
- return /* @__PURE__ */ jsx8("li", { className: "bc-item", children: isLast ? /* @__PURE__ */ jsx8("span", { className: "bc-current", "aria-current": "page", children: item.label }) : /* @__PURE__ */ jsx8(BreadcrumbLink, { item }) }, index);
505
+ return /* @__PURE__ */ jsx9("li", { className: "bc-item", children: isLast ? /* @__PURE__ */ jsx9("span", { className: "bc-current", "aria-current": "page", children: item.label }) : /* @__PURE__ */ jsx9(BreadcrumbLink, { item }) }, index);
404
506
  }) }) });
405
507
  }
406
508
  const firstItem = items[0];
407
509
  const middleItems = items.slice(1, items.length - 2);
408
510
  const parentItem = items[items.length - 2];
409
511
  const currentItem = items[items.length - 1];
410
- return /* @__PURE__ */ jsx8("nav", { "aria-label": "Breadcrumb", className, ...navProps, children: /* @__PURE__ */ jsxs8("ol", { className: listClass, children: [
411
- /* @__PURE__ */ jsx8("li", { className: "bc-item", children: /* @__PURE__ */ jsx8(BreadcrumbLink, { item: firstItem }) }),
412
- /* @__PURE__ */ jsxs8("li", { className: "bc-ellipsisItem", "aria-hidden": expanded, children: [
413
- /* @__PURE__ */ jsx8(
414
- "button",
415
- {
416
- className: "bc-ellipsisButton",
417
- onClick: () => setExpanded(true),
418
- "aria-label": "Show all breadcrumb items",
419
- children: "\u2026"
420
- }
421
- ),
422
- /* @__PURE__ */ jsx8("span", { className: "bc-separator", "aria-hidden": "true", children: /* @__PURE__ */ jsx8(ChevronRightIcon, {}) })
423
- ] }),
424
- middleItems.map((item, index) => /* @__PURE__ */ jsx8("li", { className: "bc-middleItem", children: /* @__PURE__ */ jsx8(BreadcrumbLink, { item }) }, `m-${index}`)),
425
- /* @__PURE__ */ jsx8("li", { className: "bc-item", children: /* @__PURE__ */ jsx8(BreadcrumbLink, { item: parentItem }) }),
426
- /* @__PURE__ */ jsx8("li", { className: "bc-item", children: /* @__PURE__ */ jsx8("span", { className: "bc-current", "aria-current": "page", children: currentItem.label }) })
427
- ] }) });
512
+ return /* @__PURE__ */ jsxs9(Fragment, { children: [
513
+ /* @__PURE__ */ jsx9("nav", { "aria-label": "Breadcrumb", className, ...navProps, children: /* @__PURE__ */ jsxs9("ol", { className: listClass, children: [
514
+ /* @__PURE__ */ jsx9("li", { className: "bc-item", children: /* @__PURE__ */ jsx9(BreadcrumbLink, { item: firstItem }) }),
515
+ /* @__PURE__ */ jsxs9("li", { className: "bc-ellipsisItem", children: [
516
+ /* @__PURE__ */ jsx9(
517
+ "button",
518
+ {
519
+ className: "bc-ellipsisButton",
520
+ onClick: () => setSheetOpen(true),
521
+ "aria-label": "Show all breadcrumb items",
522
+ "aria-haspopup": "dialog",
523
+ children: "\u2026"
524
+ }
525
+ ),
526
+ /* @__PURE__ */ jsx9("span", { className: "bc-separator", "aria-hidden": "true", children: /* @__PURE__ */ jsx9(ChevronRightIcon, {}) })
527
+ ] }),
528
+ middleItems.map((item, index) => /* @__PURE__ */ jsx9("li", { className: "bc-middleItem", children: /* @__PURE__ */ jsx9(BreadcrumbLink, { item }) }, `m-${index}`)),
529
+ /* @__PURE__ */ jsx9("li", { className: "bc-item", children: /* @__PURE__ */ jsx9(BreadcrumbLink, { item: parentItem }) }),
530
+ /* @__PURE__ */ jsx9("li", { className: "bc-item", children: /* @__PURE__ */ jsx9("span", { className: "bc-current", "aria-current": "page", children: currentItem.label }) })
531
+ ] }) }),
532
+ /* @__PURE__ */ jsx9(
533
+ BottomSheet,
534
+ {
535
+ open: sheetOpen,
536
+ onClose: () => setSheetOpen(false),
537
+ showHandleBar: true,
538
+ showHeader: false,
539
+ children: /* @__PURE__ */ jsx9("ul", { className: "bc-sheet-list", role: "list", children: middleItems.map((item, index) => /* @__PURE__ */ jsx9("li", { className: "bc-sheet-item", children: /* @__PURE__ */ jsx9(
540
+ "a",
541
+ {
542
+ href: item.href,
543
+ className: "bc-sheet-link",
544
+ onClick: (e) => {
545
+ item.onClick?.(e);
546
+ setSheetOpen(false);
547
+ },
548
+ children: item.label
549
+ }
550
+ ) }, `sheet-${index}`)) })
551
+ }
552
+ )
553
+ ] });
428
554
  }
429
555
 
430
556
  // primitives/ChipDropdown/ChipDropdown.tsx
431
- import { useEffect, useRef as useRef2, useState as useState4 } from "react";
432
- import { jsx as jsx9, jsxs as jsxs9 } from "react/jsx-runtime";
433
- var ChevronDownIcon = () => /* @__PURE__ */ jsx9(
557
+ import { useEffect as useEffect2, useRef as useRef2, useState as useState4 } from "react";
558
+ import { jsx as jsx10, jsxs as jsxs10 } from "react/jsx-runtime";
559
+ var ChevronDownIcon = () => /* @__PURE__ */ jsx10(
434
560
  "svg",
435
561
  {
436
562
  width: "16",
@@ -439,7 +565,7 @@ var ChevronDownIcon = () => /* @__PURE__ */ jsx9(
439
565
  fill: "none",
440
566
  xmlns: "http://www.w3.org/2000/svg",
441
567
  "aria-hidden": "true",
442
- children: /* @__PURE__ */ jsx9(
568
+ children: /* @__PURE__ */ jsx10(
443
569
  "path",
444
570
  {
445
571
  d: "M3 6l5 5 5-5",
@@ -451,7 +577,7 @@ var ChevronDownIcon = () => /* @__PURE__ */ jsx9(
451
577
  )
452
578
  }
453
579
  );
454
- var CheckIcon = () => /* @__PURE__ */ jsx9(
580
+ var CheckIcon = () => /* @__PURE__ */ jsx10(
455
581
  "svg",
456
582
  {
457
583
  width: "12",
@@ -460,7 +586,7 @@ var CheckIcon = () => /* @__PURE__ */ jsx9(
460
586
  fill: "none",
461
587
  xmlns: "http://www.w3.org/2000/svg",
462
588
  "aria-hidden": "true",
463
- children: /* @__PURE__ */ jsx9(
589
+ children: /* @__PURE__ */ jsx10(
464
590
  "path",
465
591
  {
466
592
  d: "M2 6l3 3 5-5",
@@ -485,12 +611,21 @@ var ChipDropdown = ({
485
611
  ...props
486
612
  }) => {
487
613
  const [open, setOpen] = useState4(false);
614
+ const [isMobile, setIsMobile] = useState4(
615
+ () => typeof window !== "undefined" && window.matchMedia("(max-width: 767px)").matches
616
+ );
488
617
  const wrapperRef = useRef2(null);
489
618
  const selectedOption = options.find((o) => o.value === value) ?? null;
490
619
  const displayLabel = selectedOption ? selectedOption.label : label;
491
620
  const isSelected = selectedOption !== null;
492
- useEffect(() => {
493
- if (!open) return;
621
+ useEffect2(() => {
622
+ const mq = window.matchMedia("(max-width: 767px)");
623
+ const handler = (e) => setIsMobile(e.matches);
624
+ mq.addEventListener("change", handler);
625
+ return () => mq.removeEventListener("change", handler);
626
+ }, []);
627
+ useEffect2(() => {
628
+ if (!open || isMobile) return;
494
629
  const handleClickOutside = (e) => {
495
630
  if (wrapperRef.current && !wrapperRef.current.contains(e.target)) {
496
631
  setOpen(false);
@@ -498,7 +633,7 @@ var ChipDropdown = ({
498
633
  };
499
634
  document.addEventListener("mousedown", handleClickOutside);
500
635
  return () => document.removeEventListener("mousedown", handleClickOutside);
501
- }, [open]);
636
+ }, [open, isMobile]);
502
637
  const triggerClassNames = [
503
638
  "cd-trigger",
504
639
  size,
@@ -509,8 +644,29 @@ var ChipDropdown = ({
509
644
  const handleKeyDown = (e) => {
510
645
  if (e.key === "Escape") setOpen(false);
511
646
  };
512
- return /* @__PURE__ */ jsxs9("div", { ref: wrapperRef, className: "cd-wrapper", children: [
513
- /* @__PURE__ */ jsxs9(
647
+ const handleSelect = (optionValue) => {
648
+ onChange?.(optionValue);
649
+ setOpen(false);
650
+ };
651
+ const optionList = options.map((option) => {
652
+ const isActive = option.value === value;
653
+ return /* @__PURE__ */ jsxs10(
654
+ "li",
655
+ {
656
+ role: "option",
657
+ "aria-selected": isActive,
658
+ className: ["cd-item", isActive ? "itemSelected" : ""].filter(Boolean).join(" "),
659
+ onClick: () => handleSelect(option.value),
660
+ children: [
661
+ /* @__PURE__ */ jsx10("span", { className: "cd-itemLabel", children: option.label }),
662
+ isActive && /* @__PURE__ */ jsx10("span", { className: "cd-itemCheck", children: /* @__PURE__ */ jsx10(CheckIcon, {}) })
663
+ ]
664
+ },
665
+ option.value
666
+ );
667
+ });
668
+ return /* @__PURE__ */ jsxs10("div", { ref: wrapperRef, className: "cd-wrapper", children: [
669
+ /* @__PURE__ */ jsxs10(
514
670
  "button",
515
671
  {
516
672
  type: "button",
@@ -522,56 +678,37 @@ var ChipDropdown = ({
522
678
  onKeyDown: handleKeyDown,
523
679
  ...props,
524
680
  children: [
525
- icon && /* @__PURE__ */ jsx9("span", { className: "cd-icon", children: icon }),
526
- /* @__PURE__ */ jsx9("span", { className: "cd-label", children: displayLabel }),
527
- tag && /* @__PURE__ */ jsx9("span", { className: "cd-tag", children: tag }),
528
- /* @__PURE__ */ jsx9(
681
+ icon && /* @__PURE__ */ jsx10("span", { className: "cd-icon", children: icon }),
682
+ /* @__PURE__ */ jsx10("span", { className: "cd-label", children: displayLabel }),
683
+ tag && /* @__PURE__ */ jsx10("span", { className: "cd-tag", children: tag }),
684
+ /* @__PURE__ */ jsx10(
529
685
  "span",
530
686
  {
531
687
  className: ["cd-chevron", open ? "chevronOpen" : ""].filter(Boolean).join(" "),
532
688
  "aria-hidden": "true",
533
- children: /* @__PURE__ */ jsx9(ChevronDownIcon, {})
689
+ children: /* @__PURE__ */ jsx10(ChevronDownIcon, {})
534
690
  }
535
691
  )
536
692
  ]
537
693
  }
538
694
  ),
539
- open && /* @__PURE__ */ jsx9(
540
- "ul",
695
+ !isMobile && open && /* @__PURE__ */ jsx10("ul", { role: "listbox", "aria-label": label, className: "cd-list", children: optionList }),
696
+ isMobile && /* @__PURE__ */ jsx10(
697
+ BottomSheet,
541
698
  {
542
- role: "listbox",
543
- "aria-label": label,
544
- className: "cd-list",
545
- children: options.map((option) => {
546
- const isActive = option.value === value;
547
- return /* @__PURE__ */ jsxs9(
548
- "li",
549
- {
550
- role: "option",
551
- "aria-selected": isActive,
552
- className: [
553
- "cd-item",
554
- isActive ? "itemSelected" : ""
555
- ].filter(Boolean).join(" "),
556
- onClick: () => {
557
- onChange?.(option.value);
558
- setOpen(false);
559
- },
560
- children: [
561
- /* @__PURE__ */ jsx9("span", { className: "cd-itemLabel", children: option.label }),
562
- isActive && /* @__PURE__ */ jsx9("span", { className: "cd-itemCheck", children: /* @__PURE__ */ jsx9(CheckIcon, {}) })
563
- ]
564
- },
565
- option.value
566
- );
567
- })
699
+ open,
700
+ onClose: () => setOpen(false),
701
+ title: label,
702
+ showHandleBar: true,
703
+ showHeader: true,
704
+ children: /* @__PURE__ */ jsx10("ul", { role: "listbox", "aria-label": label, className: "cd-list cd-list--sheet", children: optionList })
568
705
  }
569
706
  )
570
707
  ] });
571
708
  };
572
709
 
573
710
  // components/Card/CardPrimaryVariant.tsx
574
- import { jsx as jsx10, jsxs as jsxs10 } from "react/jsx-runtime";
711
+ import { jsx as jsx11, jsxs as jsxs11 } from "react/jsx-runtime";
575
712
  var CardPrimaryVariant = ({
576
713
  colorScheme = "light",
577
714
  title,
@@ -586,7 +723,7 @@ var CardPrimaryVariant = ({
586
723
  ...props
587
724
  }) => {
588
725
  const isInverse = colorScheme === "dark" || colorScheme === "brand" || colorScheme === "image";
589
- return /* @__PURE__ */ jsxs10(
726
+ return /* @__PURE__ */ jsxs11(
590
727
  "div",
591
728
  {
592
729
  className: [
@@ -596,14 +733,14 @@ var CardPrimaryVariant = ({
596
733
  ].filter(Boolean).join(" "),
597
734
  ...props,
598
735
  children: [
599
- colorScheme === "image" && image && /* @__PURE__ */ jsxs10("div", { "aria-hidden": "true", className: "cp-imageOverlay", children: [
600
- /* @__PURE__ */ jsx10("img", { alt: "", className: "cp-overlayImg", src: image }),
601
- /* @__PURE__ */ jsx10("div", { className: "cp-gradient" })
736
+ colorScheme === "image" && image && /* @__PURE__ */ jsxs11("div", { "aria-hidden": "true", className: "cp-imageOverlay", children: [
737
+ /* @__PURE__ */ jsx11("img", { alt: "", className: "cp-overlayImg", src: image }),
738
+ /* @__PURE__ */ jsx11("div", { className: "cp-gradient" })
602
739
  ] }),
603
- /* @__PURE__ */ jsxs10("div", { className: "cp-content", children: [
604
- /* @__PURE__ */ jsx10("p", { className: ["cp-title", isInverse ? "textInverse" : "textDefault"].join(" "), children: title }),
605
- /* @__PURE__ */ jsx10("p", { className: ["cp-description", isInverse ? "textInverse" : "textDefault"].join(" "), children: description }),
606
- showLink && /* @__PURE__ */ jsx10(
740
+ /* @__PURE__ */ jsxs11("div", { className: "cp-content", children: [
741
+ /* @__PURE__ */ jsx11("p", { className: ["cp-title", isInverse ? "textInverse" : "textDefault"].join(" "), children: title }),
742
+ /* @__PURE__ */ jsx11("p", { className: ["cp-description", isInverse ? "textInverse" : "textDefault"].join(" "), children: description }),
743
+ showLink && /* @__PURE__ */ jsx11(
607
744
  Link,
608
745
  {
609
746
  colorScheme: isInverse ? "white" : "coral",
@@ -612,14 +749,14 @@ var CardPrimaryVariant = ({
612
749
  }
613
750
  )
614
751
  ] }),
615
- colorScheme !== "image" && image && /* @__PURE__ */ jsx10("div", { className: "cp-imageSection", children: /* @__PURE__ */ jsx10("img", { alt: imageAlt, className: "cp-image", src: image }) })
752
+ colorScheme !== "image" && image && /* @__PURE__ */ jsx11("div", { className: "cp-imageSection", children: /* @__PURE__ */ jsx11("img", { alt: imageAlt, className: "cp-image", src: image }) })
616
753
  ]
617
754
  }
618
755
  );
619
756
  };
620
757
 
621
758
  // components/Card/CardSecondaryVariant.tsx
622
- import { jsx as jsx11, jsxs as jsxs11 } from "react/jsx-runtime";
759
+ import { jsx as jsx12, jsxs as jsxs12 } from "react/jsx-runtime";
623
760
  var CardSecondaryVariant = ({
624
761
  title,
625
762
  description,
@@ -632,16 +769,16 @@ var CardSecondaryVariant = ({
632
769
  variant: _variant,
633
770
  ...props
634
771
  }) => {
635
- return /* @__PURE__ */ jsxs11(
772
+ return /* @__PURE__ */ jsxs12(
636
773
  "div",
637
774
  {
638
775
  className: ["card-secondary", className ?? ""].filter(Boolean).join(" "),
639
776
  ...props,
640
777
  children: [
641
- showIcon && icon && /* @__PURE__ */ jsx11("span", { className: "cs-icon", children: icon }),
642
- /* @__PURE__ */ jsx11("p", { className: "cs-title", children: title }),
643
- /* @__PURE__ */ jsx11("p", { className: "cs-description", children: description }),
644
- showLink && /* @__PURE__ */ jsx11(
778
+ showIcon && icon && /* @__PURE__ */ jsx12("span", { className: "cs-icon", children: icon }),
779
+ /* @__PURE__ */ jsx12("p", { className: "cs-title", children: title }),
780
+ /* @__PURE__ */ jsx12("p", { className: "cs-description", children: description }),
781
+ showLink && /* @__PURE__ */ jsx12(
645
782
  Link,
646
783
  {
647
784
  colorScheme: "coral",
@@ -655,8 +792,8 @@ var CardSecondaryVariant = ({
655
792
  };
656
793
 
657
794
  // components/Card/CardThumbnailVariant.tsx
658
- import { jsx as jsx12, jsxs as jsxs12 } from "react/jsx-runtime";
659
- var LinkIcon = () => /* @__PURE__ */ jsxs12(
795
+ import { jsx as jsx13, jsxs as jsxs13 } from "react/jsx-runtime";
796
+ var LinkIcon = () => /* @__PURE__ */ jsxs13(
660
797
  "svg",
661
798
  {
662
799
  "aria-hidden": "true",
@@ -666,7 +803,7 @@ var LinkIcon = () => /* @__PURE__ */ jsxs12(
666
803
  width: "14",
667
804
  xmlns: "http://www.w3.org/2000/svg",
668
805
  children: [
669
- /* @__PURE__ */ jsx12(
806
+ /* @__PURE__ */ jsx13(
670
807
  "path",
671
808
  {
672
809
  d: "M5.25 2.625H3.5A1.75 1.75 0 0 0 1.75 4.375v5.25A1.75 1.75 0 0 0 3.5 11.375h5.25a1.75 1.75 0 0 0 1.75-1.75V7.875",
@@ -676,7 +813,7 @@ var LinkIcon = () => /* @__PURE__ */ jsxs12(
676
813
  strokeWidth: "1.25"
677
814
  }
678
815
  ),
679
- /* @__PURE__ */ jsx12(
816
+ /* @__PURE__ */ jsx13(
680
817
  "path",
681
818
  {
682
819
  d: "M7.875 1.75h4.375v4.375M12.25 1.75 6.125 7.875",
@@ -689,7 +826,7 @@ var LinkIcon = () => /* @__PURE__ */ jsxs12(
689
826
  ]
690
827
  }
691
828
  );
692
- var PlayIcon = () => /* @__PURE__ */ jsxs12(
829
+ var PlayIcon = () => /* @__PURE__ */ jsxs13(
693
830
  "svg",
694
831
  {
695
832
  "aria-hidden": "true",
@@ -699,8 +836,8 @@ var PlayIcon = () => /* @__PURE__ */ jsxs12(
699
836
  width: "80",
700
837
  xmlns: "http://www.w3.org/2000/svg",
701
838
  children: [
702
- /* @__PURE__ */ jsx12("circle", { cx: "40", cy: "40", fill: "rgba(255,255,255,0.88)", r: "40" }),
703
- /* @__PURE__ */ jsx12("path", { d: "M32 27l22 13-22 13V27z", fill: "rgba(24,28,37,0.72)" })
839
+ /* @__PURE__ */ jsx13("circle", { cx: "40", cy: "40", fill: "rgba(255,255,255,0.88)", r: "40" }),
840
+ /* @__PURE__ */ jsx13("path", { d: "M32 27l22 13-22 13V27z", fill: "rgba(24,28,37,0.72)" })
704
841
  ]
705
842
  }
706
843
  );
@@ -721,33 +858,33 @@ var CardThumbnailVariant = ({
721
858
  ...props
722
859
  }) => {
723
860
  const isVideo = type === "video";
724
- return /* @__PURE__ */ jsxs12(
861
+ return /* @__PURE__ */ jsxs13(
725
862
  "div",
726
863
  {
727
864
  className: ["card-thumbnail", className ?? ""].filter(Boolean).join(" "),
728
865
  ...props,
729
866
  children: [
730
- /* @__PURE__ */ jsxs12("div", { className: "ct-thumbnailWrapper", children: [
731
- /* @__PURE__ */ jsx12("img", { alt: thumbnailAlt, className: "ct-thumbnailImage", src: thumbnail }),
732
- isVideo && /* @__PURE__ */ jsx12("span", { "aria-label": "Play video", className: "ct-playButton", children: /* @__PURE__ */ jsx12(PlayIcon, {}) }),
733
- !isVideo && avatar && /* @__PURE__ */ jsx12("img", { alt: avatarAlt, className: "ct-avatar", src: avatar })
867
+ /* @__PURE__ */ jsxs13("div", { className: "ct-thumbnailWrapper", children: [
868
+ /* @__PURE__ */ jsx13("img", { alt: thumbnailAlt, className: "ct-thumbnailImage", src: thumbnail }),
869
+ isVideo && /* @__PURE__ */ jsx13("span", { "aria-label": "Play video", className: "ct-playButton", children: /* @__PURE__ */ jsx13(PlayIcon, {}) }),
870
+ !isVideo && avatar && /* @__PURE__ */ jsx13("img", { alt: avatarAlt, className: "ct-avatar", src: avatar })
734
871
  ] }),
735
- /* @__PURE__ */ jsxs12("div", { className: "ct-content", children: [
736
- /* @__PURE__ */ jsxs12("div", { className: "ct-metaRow", children: [
737
- !hideTags && /* @__PURE__ */ jsx12("div", { className: "ct-tagsList", children: tags.map((tag, i) => /* @__PURE__ */ jsx12(Tag, { icon: tag.icon, label: tag.label, size: "md", variant: "fill" }, i)) }),
738
- showCopyLink && /* @__PURE__ */ jsx12(
872
+ /* @__PURE__ */ jsxs13("div", { className: "ct-content", children: [
873
+ /* @__PURE__ */ jsxs13("div", { className: "ct-metaRow", children: [
874
+ !hideTags && /* @__PURE__ */ jsx13("div", { className: "ct-tagsList", children: tags.map((tag, i) => /* @__PURE__ */ jsx13(Tag, { icon: tag.icon, label: tag.label, size: "md", variant: "fill" }, i)) }),
875
+ showCopyLink && /* @__PURE__ */ jsx13(
739
876
  "button",
740
877
  {
741
878
  "aria-label": "Copy link",
742
879
  className: "ct-copyLink",
743
880
  onClick: onCopyLink,
744
881
  type: "button",
745
- children: /* @__PURE__ */ jsx12(LinkIcon, {})
882
+ children: /* @__PURE__ */ jsx13(LinkIcon, {})
746
883
  }
747
884
  )
748
885
  ] }),
749
- /* @__PURE__ */ jsx12("p", { className: "ct-title", children: title }),
750
- /* @__PURE__ */ jsx12("p", { className: "ct-summary", children: summary })
886
+ /* @__PURE__ */ jsx13("p", { className: "ct-title", children: title }),
887
+ /* @__PURE__ */ jsx13("p", { className: "ct-summary", children: summary })
751
888
  ] })
752
889
  ]
753
890
  }
@@ -755,21 +892,21 @@ var CardThumbnailVariant = ({
755
892
  };
756
893
 
757
894
  // components/Card/Card.tsx
758
- import { jsx as jsx13 } from "react/jsx-runtime";
895
+ import { jsx as jsx14 } from "react/jsx-runtime";
759
896
  var Card = (props) => {
760
897
  if (props.variant === "primary") {
761
- return /* @__PURE__ */ jsx13(CardPrimaryVariant, { ...props });
898
+ return /* @__PURE__ */ jsx14(CardPrimaryVariant, { ...props });
762
899
  }
763
900
  if (props.variant === "secondary") {
764
- return /* @__PURE__ */ jsx13(CardSecondaryVariant, { ...props });
901
+ return /* @__PURE__ */ jsx14(CardSecondaryVariant, { ...props });
765
902
  }
766
- return /* @__PURE__ */ jsx13(CardThumbnailVariant, { ...props });
903
+ return /* @__PURE__ */ jsx14(CardThumbnailVariant, { ...props });
767
904
  };
768
905
 
769
906
  // primitives/Pagination/Pagination.tsx
770
- import { jsx as jsx14, jsxs as jsxs13 } from "react/jsx-runtime";
771
- var ChevronLeft = () => /* @__PURE__ */ jsx14("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", "aria-hidden": "true", children: /* @__PURE__ */ jsx14("path", { d: "M10 12L6 8L10 4", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }) });
772
- var ChevronRight = () => /* @__PURE__ */ jsx14("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", "aria-hidden": "true", children: /* @__PURE__ */ jsx14("path", { d: "M6 4L10 8L6 12", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }) });
907
+ import { jsx as jsx15, jsxs as jsxs14 } from "react/jsx-runtime";
908
+ var ChevronLeft = () => /* @__PURE__ */ jsx15("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", "aria-hidden": "true", children: /* @__PURE__ */ jsx15("path", { d: "M10 12L6 8L10 4", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }) });
909
+ var ChevronRight = () => /* @__PURE__ */ jsx15("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", "aria-hidden": "true", children: /* @__PURE__ */ jsx15("path", { d: "M6 4L10 8L6 12", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }) });
773
910
  function getPageItems(currentPage, totalPages) {
774
911
  if (totalPages <= 5) {
775
912
  return Array.from({ length: totalPages }, (_, i) => i + 1);
@@ -791,25 +928,25 @@ var Pagination = ({
791
928
  const items = getPageItems(currentPage, totalPages);
792
929
  const isPrevDisabled = currentPage <= 1;
793
930
  const isNextDisabled = currentPage >= totalPages;
794
- return /* @__PURE__ */ jsxs13(
931
+ return /* @__PURE__ */ jsxs14(
795
932
  "nav",
796
933
  {
797
934
  className: ["pagination", className ?? ""].filter(Boolean).join(" "),
798
935
  "aria-label": "Pagination navigation",
799
936
  children: [
800
- /* @__PURE__ */ jsx14(
937
+ /* @__PURE__ */ jsx15(
801
938
  "button",
802
939
  {
803
940
  className: ["navButton", isPrevDisabled ? "navButtonDisabled" : ""].filter(Boolean).join(" "),
804
941
  onClick: () => onPageChange(currentPage - 1),
805
942
  disabled: isPrevDisabled,
806
943
  "aria-label": "Previous page",
807
- children: /* @__PURE__ */ jsx14("span", { className: "navIcon", children: /* @__PURE__ */ jsx14(ChevronLeft, {}) })
944
+ children: /* @__PURE__ */ jsx15("span", { className: "navIcon", children: /* @__PURE__ */ jsx15(ChevronLeft, {}) })
808
945
  }
809
946
  ),
810
947
  items.map((item, index) => {
811
948
  if (item === "ellipsis-left" || item === "ellipsis-right") {
812
- return /* @__PURE__ */ jsx14(
949
+ return /* @__PURE__ */ jsx15(
813
950
  "span",
814
951
  {
815
952
  className: "ellipsis",
@@ -820,7 +957,7 @@ var Pagination = ({
820
957
  );
821
958
  }
822
959
  const isSelected = item === currentPage;
823
- return /* @__PURE__ */ jsx14(
960
+ return /* @__PURE__ */ jsx15(
824
961
  "button",
825
962
  {
826
963
  className: ["pageButton", isSelected ? "pageButtonSelected" : ""].filter(Boolean).join(" "),
@@ -834,14 +971,14 @@ var Pagination = ({
834
971
  item
835
972
  );
836
973
  }),
837
- /* @__PURE__ */ jsx14(
974
+ /* @__PURE__ */ jsx15(
838
975
  "button",
839
976
  {
840
977
  className: ["navButton", isNextDisabled ? "navButtonDisabled" : ""].filter(Boolean).join(" "),
841
978
  onClick: () => onPageChange(currentPage + 1),
842
979
  disabled: isNextDisabled,
843
980
  "aria-label": "Next page",
844
- children: /* @__PURE__ */ jsx14("span", { className: "navIcon", children: /* @__PURE__ */ jsx14(ChevronRight, {}) })
981
+ children: /* @__PURE__ */ jsx15("span", { className: "navIcon", children: /* @__PURE__ */ jsx15(ChevronRight, {}) })
845
982
  }
846
983
  )
847
984
  ]
@@ -850,7 +987,7 @@ var Pagination = ({
850
987
  };
851
988
 
852
989
  // templates/FeatureCards/FeatureCards.tsx
853
- import { jsx as jsx15, jsxs as jsxs14 } from "react/jsx-runtime";
990
+ import { jsx as jsx16, jsxs as jsxs15 } from "react/jsx-runtime";
854
991
  var FeatureCards = ({
855
992
  sectionTitle,
856
993
  sectionDescription,
@@ -860,11 +997,11 @@ var FeatureCards = ({
860
997
  cardColorScheme = "image",
861
998
  cards
862
999
  }) => {
863
- return /* @__PURE__ */ jsx15("section", { className: "fc-section", children: /* @__PURE__ */ jsxs14("div", { className: "fc-container", children: [
864
- /* @__PURE__ */ jsxs14("div", { className: "fc-header", children: [
865
- /* @__PURE__ */ jsx15("h2", { className: "fc-sectionTitle", children: sectionTitle }),
866
- sectionDescription && /* @__PURE__ */ jsx15("p", { className: "fc-sectionDescription", children: sectionDescription }),
867
- showLink && /* @__PURE__ */ jsx15(
1000
+ return /* @__PURE__ */ jsx16("section", { className: "fc-section", children: /* @__PURE__ */ jsxs15("div", { className: "fc-container", children: [
1001
+ /* @__PURE__ */ jsxs15("div", { className: "fc-header", children: [
1002
+ /* @__PURE__ */ jsx16("h2", { className: "fc-sectionTitle", children: sectionTitle }),
1003
+ sectionDescription && /* @__PURE__ */ jsx16("p", { className: "fc-sectionDescription", children: sectionDescription }),
1004
+ showLink && /* @__PURE__ */ jsx16(
868
1005
  Link,
869
1006
  {
870
1007
  colorScheme: "coral",
@@ -873,7 +1010,7 @@ var FeatureCards = ({
873
1010
  }
874
1011
  )
875
1012
  ] }),
876
- /* @__PURE__ */ jsx15("div", { className: "fc-grid", children: cards.map((card, index) => /* @__PURE__ */ jsx15(
1013
+ /* @__PURE__ */ jsx16("div", { className: "fc-grid", children: cards.map((card, index) => /* @__PURE__ */ jsx16(
877
1014
  Card,
878
1015
  {
879
1016
  variant: "primary",
@@ -890,17 +1027,1521 @@ var FeatureCards = ({
890
1027
  )) })
891
1028
  ] }) });
892
1029
  };
1030
+
1031
+ // templates/Footer/Footer.tsx
1032
+ import { useState as useState5 } from "react";
1033
+ import { jsx as jsx17, jsxs as jsxs16 } from "react/jsx-runtime";
1034
+ var ExternalLinkIcon = () => /* @__PURE__ */ jsx17(
1035
+ "svg",
1036
+ {
1037
+ width: "12",
1038
+ height: "12",
1039
+ viewBox: "0 0 12 12",
1040
+ fill: "none",
1041
+ "aria-hidden": "true",
1042
+ focusable: "false",
1043
+ children: /* @__PURE__ */ jsx17(
1044
+ "path",
1045
+ {
1046
+ d: "M2 2H10M10 2V10M10 2L2 10",
1047
+ stroke: "currentColor",
1048
+ strokeWidth: "1.5",
1049
+ strokeLinecap: "round",
1050
+ strokeLinejoin: "round"
1051
+ }
1052
+ )
1053
+ }
1054
+ );
1055
+ var ChevronDownIcon2 = () => /* @__PURE__ */ jsx17(
1056
+ "svg",
1057
+ {
1058
+ width: "12",
1059
+ height: "12",
1060
+ viewBox: "0 0 12 12",
1061
+ fill: "none",
1062
+ "aria-hidden": "true",
1063
+ focusable: "false",
1064
+ children: /* @__PURE__ */ jsx17(
1065
+ "path",
1066
+ {
1067
+ d: "M2 4L6 8L10 4",
1068
+ stroke: "currentColor",
1069
+ strokeWidth: "1.5",
1070
+ strokeLinecap: "round",
1071
+ strokeLinejoin: "round"
1072
+ }
1073
+ )
1074
+ }
1075
+ );
1076
+ var DerivGoBadges = ({
1077
+ googlePlayBadge,
1078
+ appStoreBadge,
1079
+ huaweiBadge,
1080
+ availabilityNote
1081
+ }) => /* @__PURE__ */ jsxs16("div", { className: "footer__app-badges", children: [
1082
+ googlePlayBadge && /* @__PURE__ */ jsx17(
1083
+ "a",
1084
+ {
1085
+ href: googlePlayBadge.href,
1086
+ className: googlePlayBadge.icon ? "footer__app-badge-svg" : "footer__app-badge",
1087
+ "aria-label": googlePlayBadge.imageAlt,
1088
+ target: "_blank",
1089
+ rel: "noopener noreferrer",
1090
+ children: googlePlayBadge.icon ?? /* @__PURE__ */ jsx17("img", { src: googlePlayBadge.imageSrc, alt: googlePlayBadge.imageAlt })
1091
+ }
1092
+ ),
1093
+ appStoreBadge && /* @__PURE__ */ jsx17(
1094
+ "a",
1095
+ {
1096
+ href: appStoreBadge.href,
1097
+ className: appStoreBadge.icon ? "footer__app-badge-svg" : "footer__app-badge",
1098
+ "aria-label": appStoreBadge.imageAlt,
1099
+ target: "_blank",
1100
+ rel: "noopener noreferrer",
1101
+ children: appStoreBadge.icon ?? /* @__PURE__ */ jsx17("img", { src: appStoreBadge.imageSrc, alt: appStoreBadge.imageAlt })
1102
+ }
1103
+ ),
1104
+ huaweiBadge && /* @__PURE__ */ jsx17(
1105
+ "a",
1106
+ {
1107
+ href: huaweiBadge.href,
1108
+ className: huaweiBadge.icon ? "footer__app-badge-svg" : "footer__app-badge",
1109
+ "aria-label": huaweiBadge.imageAlt,
1110
+ target: "_blank",
1111
+ rel: "noopener noreferrer",
1112
+ children: huaweiBadge.icon ?? /* @__PURE__ */ jsx17("img", { src: huaweiBadge.imageSrc, alt: huaweiBadge.imageAlt })
1113
+ }
1114
+ ),
1115
+ availabilityNote && /* @__PURE__ */ jsx17("p", { className: "footer__app-note", children: availabilityNote })
1116
+ ] });
1117
+ var NavLink = ({ label, href, isExternal, onClick }) => /* @__PURE__ */ jsxs16(
1118
+ "a",
1119
+ {
1120
+ href,
1121
+ className: "footer__nav-link",
1122
+ onClick,
1123
+ ...isExternal ? { target: "_blank", rel: "noopener noreferrer" } : {},
1124
+ children: [
1125
+ label,
1126
+ isExternal && /* @__PURE__ */ jsx17(ExternalLinkIcon, {})
1127
+ ]
1128
+ }
1129
+ );
1130
+ var Footer = ({
1131
+ logoSrc,
1132
+ logoAlt = "Deriv",
1133
+ navColumns,
1134
+ socialLinks = [],
1135
+ derivGo,
1136
+ investorsInPeopleSrc,
1137
+ investorsInPeopleAlt = "Investors in People - Platinum",
1138
+ licenseText,
1139
+ riskWarningText,
1140
+ aiSummary,
1141
+ className,
1142
+ ...props
1143
+ }) => {
1144
+ const allSections = navColumns.flat();
1145
+ const [openSections, setOpenSections] = useState5(/* @__PURE__ */ new Set());
1146
+ const toggleSection = (index) => {
1147
+ setOpenSections((prev) => {
1148
+ const next = new Set(prev);
1149
+ if (next.has(index)) {
1150
+ next.delete(index);
1151
+ } else {
1152
+ next.add(index);
1153
+ }
1154
+ return next;
1155
+ });
1156
+ };
1157
+ const aiLabel = aiSummary?.label ?? "Ask AI for a summary of Deriv";
1158
+ return /* @__PURE__ */ jsx17(
1159
+ "footer",
1160
+ {
1161
+ className: ["footer", className].filter(Boolean).join(" "),
1162
+ ...props,
1163
+ children: /* @__PURE__ */ jsxs16("div", { className: "footer__inner", children: [
1164
+ /* @__PURE__ */ jsxs16("div", { className: "footer__header", children: [
1165
+ /* @__PURE__ */ jsx17("div", { className: "footer__logo-wrapper", children: /* @__PURE__ */ jsx17(
1166
+ "img",
1167
+ {
1168
+ src: logoSrc,
1169
+ alt: logoAlt,
1170
+ className: "footer__logo"
1171
+ }
1172
+ ) }),
1173
+ aiSummary && /* @__PURE__ */ jsxs16("div", { className: "footer__ai-bar footer__ai-bar--inline", children: [
1174
+ /* @__PURE__ */ jsx17("span", { className: "footer__ai-bar-label", children: aiLabel }),
1175
+ /* @__PURE__ */ jsx17("div", { className: "footer__ai-bar-icons", children: aiSummary.items.map((item, i) => /* @__PURE__ */ jsx17(
1176
+ "a",
1177
+ {
1178
+ href: item.href,
1179
+ className: "footer__ai-icon",
1180
+ "aria-label": item.imageAlt,
1181
+ target: "_blank",
1182
+ rel: "noopener noreferrer",
1183
+ children: /* @__PURE__ */ jsx17("img", { src: item.imageSrc, alt: item.imageAlt })
1184
+ },
1185
+ i
1186
+ )) })
1187
+ ] }),
1188
+ /* @__PURE__ */ jsx17("div", { className: "footer__social footer__social--in-header", children: socialLinks.map((link, i) => /* @__PURE__ */ jsx17(
1189
+ "a",
1190
+ {
1191
+ href: link.href,
1192
+ className: "footer__social-icon",
1193
+ "aria-label": link.ariaLabel,
1194
+ target: "_blank",
1195
+ rel: "noopener noreferrer",
1196
+ children: link.icon
1197
+ },
1198
+ i
1199
+ )) })
1200
+ ] }),
1201
+ aiSummary && /* @__PURE__ */ jsx17("div", { className: "footer__ai-section", children: /* @__PURE__ */ jsxs16("div", { className: "footer__ai-bar footer__ai-bar--block", children: [
1202
+ /* @__PURE__ */ jsx17("span", { className: "footer__ai-bar-label", children: aiLabel }),
1203
+ /* @__PURE__ */ jsx17("div", { className: "footer__ai-bar-icons", children: aiSummary.items.map((item, i) => /* @__PURE__ */ jsx17(
1204
+ "a",
1205
+ {
1206
+ href: item.href,
1207
+ className: "footer__ai-icon",
1208
+ "aria-label": item.imageAlt,
1209
+ target: "_blank",
1210
+ rel: "noopener noreferrer",
1211
+ children: /* @__PURE__ */ jsx17("img", { src: item.imageSrc, alt: item.imageAlt })
1212
+ },
1213
+ i
1214
+ )) })
1215
+ ] }) }),
1216
+ /* @__PURE__ */ jsxs16("div", { className: "footer__nav footer__nav--columns", children: [
1217
+ navColumns.map((column, colIdx) => /* @__PURE__ */ jsx17("div", { className: "footer__column", children: column.map((section, secIdx) => /* @__PURE__ */ jsxs16("div", { className: "footer__nav-section", children: [
1218
+ /* @__PURE__ */ jsx17("p", { className: "footer__nav-title", children: section.title }),
1219
+ /* @__PURE__ */ jsx17("ul", { className: "footer__nav-links", children: section.links.map((link, linkIdx) => /* @__PURE__ */ jsx17("li", { children: /* @__PURE__ */ jsx17(NavLink, { ...link }) }, linkIdx)) })
1220
+ ] }, secIdx)) }, colIdx)),
1221
+ /* @__PURE__ */ jsxs16("div", { className: "footer__sidebar", children: [
1222
+ investorsInPeopleSrc && /* @__PURE__ */ jsx17("div", { className: "footer__investors-card", children: /* @__PURE__ */ jsx17(
1223
+ "img",
1224
+ {
1225
+ src: investorsInPeopleSrc,
1226
+ alt: investorsInPeopleAlt,
1227
+ className: "footer__investors-img"
1228
+ }
1229
+ ) }),
1230
+ derivGo && /* @__PURE__ */ jsxs16("div", { className: "footer__deriv-go-card", children: [
1231
+ /* @__PURE__ */ jsxs16("div", { className: "footer__deriv-go-header", children: [
1232
+ /* @__PURE__ */ jsx17(
1233
+ "img",
1234
+ {
1235
+ src: derivGo.logoSrc,
1236
+ alt: derivGo.logoAlt ?? "Deriv GO",
1237
+ className: "footer__deriv-go-logo"
1238
+ }
1239
+ ),
1240
+ /* @__PURE__ */ jsx17("span", { className: "footer__deriv-go-title", children: derivGo.title ?? "Deriv GO" })
1241
+ ] }),
1242
+ /* @__PURE__ */ jsx17("p", { className: "footer__deriv-go-desc", children: derivGo.description ?? "Trade multipliers on our mobile app." }),
1243
+ (derivGo.qrCodeSrc || derivGo.qrCodeIcon) && /* @__PURE__ */ jsxs16("div", { className: "footer__deriv-go-qr", children: [
1244
+ derivGo.qrCodeIcon ? /* @__PURE__ */ jsx17("div", { className: "footer__deriv-go-qr-icon", children: derivGo.qrCodeIcon }) : /* @__PURE__ */ jsx17(
1245
+ "img",
1246
+ {
1247
+ src: derivGo.qrCodeSrc,
1248
+ alt: derivGo.qrCodeAlt ?? "Scan to download",
1249
+ className: "footer__deriv-go-qr-img"
1250
+ }
1251
+ ),
1252
+ /* @__PURE__ */ jsx17("span", { className: "footer__deriv-go-qr-label", children: "Scan to download" })
1253
+ ] }),
1254
+ /* @__PURE__ */ jsx17(
1255
+ DerivGoBadges,
1256
+ {
1257
+ googlePlayBadge: derivGo.googlePlayBadge,
1258
+ appStoreBadge: derivGo.appStoreBadge,
1259
+ huaweiBadge: derivGo.huaweiBadge,
1260
+ availabilityNote: derivGo.availabilityNote
1261
+ }
1262
+ )
1263
+ ] })
1264
+ ] })
1265
+ ] }),
1266
+ /* @__PURE__ */ jsx17("div", { className: "footer__nav footer__nav--accordion", children: allSections.map((section, idx) => {
1267
+ const isOpen = openSections.has(idx);
1268
+ return /* @__PURE__ */ jsxs16(
1269
+ "div",
1270
+ {
1271
+ className: [
1272
+ "footer__accordion-item",
1273
+ isOpen && "footer__accordion-item--open"
1274
+ ].filter(Boolean).join(" "),
1275
+ children: [
1276
+ /* @__PURE__ */ jsxs16(
1277
+ "button",
1278
+ {
1279
+ type: "button",
1280
+ className: "footer__accordion-toggle",
1281
+ onClick: () => toggleSection(idx),
1282
+ "aria-expanded": isOpen,
1283
+ children: [
1284
+ /* @__PURE__ */ jsx17("span", { className: "footer__accordion-label", children: section.title }),
1285
+ /* @__PURE__ */ jsx17("span", { className: "footer__accordion-chevron", children: /* @__PURE__ */ jsx17(ChevronDownIcon2, {}) })
1286
+ ]
1287
+ }
1288
+ ),
1289
+ isOpen && /* @__PURE__ */ jsx17("ul", { className: "footer__accordion-links", children: section.links.map((link, linkIdx) => /* @__PURE__ */ jsx17("li", { children: /* @__PURE__ */ jsx17(NavLink, { ...link }) }, linkIdx)) })
1290
+ ]
1291
+ },
1292
+ idx
1293
+ );
1294
+ }) }),
1295
+ socialLinks.length > 0 && /* @__PURE__ */ jsx17("div", { className: "footer__social footer__social--standalone", children: socialLinks.map((link, i) => /* @__PURE__ */ jsx17(
1296
+ "a",
1297
+ {
1298
+ href: link.href,
1299
+ className: "footer__social-icon",
1300
+ "aria-label": link.ariaLabel,
1301
+ target: "_blank",
1302
+ rel: "noopener noreferrer",
1303
+ children: link.icon
1304
+ },
1305
+ i
1306
+ )) }),
1307
+ derivGo && /* @__PURE__ */ jsxs16("div", { className: "footer__deriv-go-banner", children: [
1308
+ /* @__PURE__ */ jsxs16("div", { className: "footer__deriv-go-banner-info", children: [
1309
+ /* @__PURE__ */ jsxs16("div", { className: "footer__deriv-go-header", children: [
1310
+ /* @__PURE__ */ jsx17(
1311
+ "img",
1312
+ {
1313
+ src: derivGo.logoSrc,
1314
+ alt: derivGo.logoAlt ?? "Deriv GO",
1315
+ className: "footer__deriv-go-logo"
1316
+ }
1317
+ ),
1318
+ /* @__PURE__ */ jsx17("span", { className: "footer__deriv-go-title", children: derivGo.title ?? "Deriv GO" })
1319
+ ] }),
1320
+ /* @__PURE__ */ jsx17("p", { className: "footer__deriv-go-desc", children: derivGo.description ?? "Trade multipliers on our mobile app." })
1321
+ ] }),
1322
+ /* @__PURE__ */ jsx17("div", { className: "footer__deriv-go-banner-badges", children: /* @__PURE__ */ jsx17(
1323
+ DerivGoBadges,
1324
+ {
1325
+ googlePlayBadge: derivGo.googlePlayBadge,
1326
+ appStoreBadge: derivGo.appStoreBadge,
1327
+ huaweiBadge: derivGo.huaweiBadge,
1328
+ availabilityNote: derivGo.availabilityNote
1329
+ }
1330
+ ) })
1331
+ ] }),
1332
+ (licenseText || riskWarningText) && /* @__PURE__ */ jsxs16("div", { className: "footer__legal-block", children: [
1333
+ licenseText && /* @__PURE__ */ jsx17("div", { className: "footer__license", children: licenseText }),
1334
+ riskWarningText && /* @__PURE__ */ jsx17("div", { className: "footer__risk-warning", children: /* @__PURE__ */ jsx17("p", { className: "footer__risk-warning-text", children: riskWarningText }) })
1335
+ ] }),
1336
+ investorsInPeopleSrc && /* @__PURE__ */ jsx17("div", { className: "footer__investors-stacked", children: /* @__PURE__ */ jsx17(
1337
+ "img",
1338
+ {
1339
+ src: investorsInPeopleSrc,
1340
+ alt: investorsInPeopleAlt,
1341
+ className: "footer__investors-img"
1342
+ }
1343
+ ) })
1344
+ ] })
1345
+ }
1346
+ );
1347
+ };
1348
+
1349
+ // templates/Hero/Hero.tsx
1350
+ import { jsx as jsx18, jsxs as jsxs17 } from "react/jsx-runtime";
1351
+ var Visual = ({
1352
+ src,
1353
+ className,
1354
+ alt = ""
1355
+ }) => /* @__PURE__ */ jsx18("div", { className, children: typeof src === "string" ? /* @__PURE__ */ jsx18("img", { src, alt }) : src });
1356
+ var Hero = ({
1357
+ variant,
1358
+ subtitle,
1359
+ title,
1360
+ description,
1361
+ primaryButton,
1362
+ secondaryButton,
1363
+ backgroundImageSrc,
1364
+ heroImage,
1365
+ leftVisual,
1366
+ rightVisual,
1367
+ className,
1368
+ ...props
1369
+ }) => {
1370
+ const variantClass = `hero--${variant}`;
1371
+ const textBlock = /* @__PURE__ */ jsxs17("div", { className: "hero__text", children: [
1372
+ subtitle && /* @__PURE__ */ jsx18("p", { className: "hero__subtitle", children: subtitle }),
1373
+ /* @__PURE__ */ jsx18("p", { className: "hero__title", children: title }),
1374
+ description && /* @__PURE__ */ jsx18("p", { className: "hero__description", children: description })
1375
+ ] });
1376
+ const buttonBlock = (primaryButton || secondaryButton) && /* @__PURE__ */ jsxs17("div", { className: "hero__buttons", children: [
1377
+ primaryButton && (primaryButton.href ? /* @__PURE__ */ jsx18("a", { href: primaryButton.href, children: /* @__PURE__ */ jsx18(
1378
+ Button,
1379
+ {
1380
+ colorScheme: "coral",
1381
+ variant: "primary",
1382
+ label: primaryButton.label,
1383
+ onClick: primaryButton.onClick
1384
+ }
1385
+ ) }) : /* @__PURE__ */ jsx18(
1386
+ Button,
1387
+ {
1388
+ colorScheme: "coral",
1389
+ variant: "primary",
1390
+ label: primaryButton.label,
1391
+ onClick: primaryButton.onClick
1392
+ }
1393
+ )),
1394
+ secondaryButton && (secondaryButton.href ? /* @__PURE__ */ jsx18("a", { href: secondaryButton.href, children: /* @__PURE__ */ jsx18(
1395
+ Button,
1396
+ {
1397
+ colorScheme: "white",
1398
+ variant: "secondary",
1399
+ label: secondaryButton.label,
1400
+ onClick: secondaryButton.onClick
1401
+ }
1402
+ ) }) : /* @__PURE__ */ jsx18(
1403
+ Button,
1404
+ {
1405
+ colorScheme: "white",
1406
+ variant: "secondary",
1407
+ label: secondaryButton.label,
1408
+ onClick: secondaryButton.onClick
1409
+ }
1410
+ ))
1411
+ ] });
1412
+ if (variant === "homepage") {
1413
+ return /* @__PURE__ */ jsxs17(
1414
+ "section",
1415
+ {
1416
+ className: ["hero", variantClass, className].filter(Boolean).join(" "),
1417
+ ...props,
1418
+ children: [
1419
+ backgroundImageSrc && /* @__PURE__ */ jsx18(
1420
+ "img",
1421
+ {
1422
+ src: backgroundImageSrc,
1423
+ alt: "",
1424
+ className: "hero__bg-image",
1425
+ "aria-hidden": "true"
1426
+ }
1427
+ ),
1428
+ heroImage && /* @__PURE__ */ jsx18(
1429
+ Visual,
1430
+ {
1431
+ src: heroImage,
1432
+ className: "hero__image-slot",
1433
+ alt: ""
1434
+ }
1435
+ ),
1436
+ /* @__PURE__ */ jsx18("div", { className: "hero__overlay", "aria-hidden": "true" }),
1437
+ /* @__PURE__ */ jsx18("div", { className: "hero__inner", children: /* @__PURE__ */ jsx18("div", { className: "hero__content", children: /* @__PURE__ */ jsx18("div", { className: "hero__left", children: /* @__PURE__ */ jsxs17("div", { className: "hero__body", children: [
1438
+ textBlock,
1439
+ buttonBlock
1440
+ ] }) }) }) })
1441
+ ]
1442
+ }
1443
+ );
1444
+ }
1445
+ if (variant === "full-image") {
1446
+ return /* @__PURE__ */ jsxs17(
1447
+ "section",
1448
+ {
1449
+ className: ["hero", variantClass, className].filter(Boolean).join(" "),
1450
+ ...props,
1451
+ children: [
1452
+ backgroundImageSrc && /* @__PURE__ */ jsx18(
1453
+ "img",
1454
+ {
1455
+ src: backgroundImageSrc,
1456
+ alt: "",
1457
+ className: "hero__bg-image",
1458
+ "aria-hidden": "true"
1459
+ }
1460
+ ),
1461
+ /* @__PURE__ */ jsx18("div", { className: "hero__overlay", "aria-hidden": "true" }),
1462
+ /* @__PURE__ */ jsx18("div", { className: "hero__inner", children: /* @__PURE__ */ jsx18("div", { className: "hero__content", children: /* @__PURE__ */ jsxs17("div", { className: "hero__body", children: [
1463
+ textBlock,
1464
+ buttonBlock
1465
+ ] }) }) })
1466
+ ]
1467
+ }
1468
+ );
1469
+ }
1470
+ return /* @__PURE__ */ jsxs17(
1471
+ "section",
1472
+ {
1473
+ className: ["hero", variantClass, className].filter(Boolean).join(" "),
1474
+ ...props,
1475
+ children: [
1476
+ /* @__PURE__ */ jsx18("div", { className: "hero__grid", "aria-hidden": "true" }),
1477
+ variant === "visuals" && leftVisual && /* @__PURE__ */ jsx18(
1478
+ Visual,
1479
+ {
1480
+ src: leftVisual,
1481
+ className: "hero__visual hero__visual--left",
1482
+ alt: ""
1483
+ }
1484
+ ),
1485
+ variant === "visuals" && rightVisual && /* @__PURE__ */ jsx18(
1486
+ Visual,
1487
+ {
1488
+ src: rightVisual,
1489
+ className: "hero__visual hero__visual--right",
1490
+ alt: ""
1491
+ }
1492
+ ),
1493
+ /* @__PURE__ */ jsx18("div", { className: "hero__overlay", "aria-hidden": "true" }),
1494
+ /* @__PURE__ */ jsx18("div", { className: "hero__inner", children: /* @__PURE__ */ jsx18("div", { className: "hero__content", children: /* @__PURE__ */ jsxs17("div", { className: "hero__body", children: [
1495
+ textBlock,
1496
+ buttonBlock
1497
+ ] }) }) })
1498
+ ]
1499
+ }
1500
+ );
1501
+ };
1502
+
1503
+ // templates/Stats/Stats.tsx
1504
+ import { useEffect as useEffect3, useRef as useRef3, useState as useState6 } from "react";
1505
+ import { jsx as jsx19, jsxs as jsxs18 } from "react/jsx-runtime";
1506
+ var INTERVAL_MS = 2e3;
1507
+ var TRANSITION = "transform 0.8s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1)";
1508
+ function relativePos(index, active, total) {
1509
+ const raw = ((index - active) % total + total) % total;
1510
+ return raw > total / 2 ? raw - total : raw;
1511
+ }
1512
+ function getStatStyle(rel) {
1513
+ if (rel === 0) {
1514
+ return { transform: "translateY(-50%) scale(1)", opacity: 1, zIndex: 2, transition: TRANSITION };
1515
+ }
1516
+ if (rel === -1) {
1517
+ return { transform: "translateY(calc(-50% - 110%)) scale(0.7)", opacity: 1, zIndex: 1, transition: TRANSITION };
1518
+ }
1519
+ if (rel === 1) {
1520
+ return { transform: "translateY(calc(-50% + 110%)) scale(0.7)", opacity: 1, zIndex: 1, transition: TRANSITION };
1521
+ }
1522
+ return {
1523
+ transform: rel < 0 ? "translateY(calc(-50% - 110%)) scale(0.4)" : "translateY(calc(-50% + 110%)) scale(0.4)",
1524
+ opacity: 0,
1525
+ zIndex: 0,
1526
+ transition: TRANSITION
1527
+ };
1528
+ }
1529
+ var AwardBadge = ({ imageSrc, imageAlt = "" }) => /* @__PURE__ */ jsx19("div", { className: "stats__award", children: /* @__PURE__ */ jsx19("img", { src: imageSrc, alt: imageAlt, className: "stats__award-image" }) });
1530
+ var Stats = ({
1531
+ title,
1532
+ description,
1533
+ stats,
1534
+ leftAwards = [],
1535
+ rightAwards = [],
1536
+ className,
1537
+ ...props
1538
+ }) => {
1539
+ const [activeIndex, setActiveIndex] = useState6(0);
1540
+ const intervalRef = useRef3(null);
1541
+ const hasAwards = leftAwards.length > 0 || rightAwards.length > 0;
1542
+ const allAwards = [...leftAwards, ...rightAwards];
1543
+ const total = stats.length;
1544
+ useEffect3(() => {
1545
+ if (total <= 1) return;
1546
+ intervalRef.current = setInterval(() => {
1547
+ setActiveIndex((prev) => (prev + 1) % total);
1548
+ }, INTERVAL_MS);
1549
+ return () => {
1550
+ if (intervalRef.current) clearInterval(intervalRef.current);
1551
+ };
1552
+ }, [total]);
1553
+ return /* @__PURE__ */ jsx19(
1554
+ "section",
1555
+ {
1556
+ className: ["stats", className].filter(Boolean).join(" "),
1557
+ ...props,
1558
+ children: /* @__PURE__ */ jsxs18("div", { className: "stats__inner", children: [
1559
+ /* @__PURE__ */ jsxs18("div", { className: "stats__header", children: [
1560
+ /* @__PURE__ */ jsx19("h2", { className: "stats__title", children: title }),
1561
+ description && /* @__PURE__ */ jsx19("p", { className: "stats__description", children: description })
1562
+ ] }),
1563
+ /* @__PURE__ */ jsxs18("div", { className: "stats__content", children: [
1564
+ leftAwards.length > 0 && /* @__PURE__ */ jsx19("div", { className: "stats__awards-col stats__awards-col--left", children: leftAwards.map((award, i) => /* @__PURE__ */ jsx19(AwardBadge, { ...award }, i)) }),
1565
+ /* @__PURE__ */ jsx19("div", { className: "stats__card", children: /* @__PURE__ */ jsxs18("div", { className: "stats__card-track", children: [
1566
+ /* @__PURE__ */ jsx19("div", { className: "stats__fade stats__fade--top", "aria-hidden": "true" }),
1567
+ /* @__PURE__ */ jsx19("div", { className: "stats__fade stats__fade--bottom", "aria-hidden": "true" }),
1568
+ stats.map((stat, i) => {
1569
+ const rel = relativePos(i, activeIndex, total);
1570
+ const active = rel === 0;
1571
+ return /* @__PURE__ */ jsxs18(
1572
+ "div",
1573
+ {
1574
+ className: [
1575
+ "stats__stat",
1576
+ active ? "stats__stat--active" : "stats__stat--inactive"
1577
+ ].join(" "),
1578
+ style: getStatStyle(rel),
1579
+ "aria-hidden": !active,
1580
+ children: [
1581
+ /* @__PURE__ */ jsx19("span", { className: "stats__stat-value", children: stat.value }),
1582
+ /* @__PURE__ */ jsx19("span", { className: "stats__stat-label", children: stat.label })
1583
+ ]
1584
+ },
1585
+ i
1586
+ );
1587
+ })
1588
+ ] }) }),
1589
+ rightAwards.length > 0 && /* @__PURE__ */ jsx19("div", { className: "stats__awards-col stats__awards-col--right", children: rightAwards.map((award, i) => /* @__PURE__ */ jsx19(AwardBadge, { ...award }, i)) }),
1590
+ hasAwards && /* @__PURE__ */ jsx19("div", { className: "stats__awards-mobile", children: allAwards.map((award, i) => /* @__PURE__ */ jsx19(AwardBadge, { ...award }, i)) })
1591
+ ] })
1592
+ ] })
1593
+ }
1594
+ );
1595
+ };
1596
+
1597
+ // templates/Scrollytelling/Scrollytelling.tsx
1598
+ import { useEffect as useEffect4, useRef as useRef4, useState as useState7 } from "react";
1599
+ import { DotLottieReact } from "@lottiefiles/dotlottie-react";
1600
+ import { jsx as jsx20, jsxs as jsxs19 } from "react/jsx-runtime";
1601
+ var SCROLLYTELLING_DATA = [
1602
+ {
1603
+ title: "Forex",
1604
+ description: "Trade the most popular currency pairs with high leverage, tight spreads, and fast execution.",
1605
+ linkLabel: "Learn more",
1606
+ link: "/markets/forex",
1607
+ mediaUrl: "https://cdn.prod.website-files.com/66fbaad381fa6866fa4991f3/675a906489e5aadf94e501c4_Forex.lottie"
1608
+ },
1609
+ {
1610
+ title: "Derived Indices",
1611
+ description: "Trade 24/7 on exclusive Synthetic and Derived Indices. Choose volatility levels that match your strategy.",
1612
+ linkLabel: "Learn more",
1613
+ link: "/markets/derived-indices/synthetic-indices",
1614
+ mediaUrl: "https://cdn.prod.website-files.com/66fbaad381fa6866fa4991f3/675a9064588b0d2709e7ceac_Derived%20Indices.lottie"
1615
+ },
1616
+ {
1617
+ title: "Stocks",
1618
+ description: "Trade global market leaders like Apple, Tesla, and NVIDIA.",
1619
+ linkLabel: "Learn more",
1620
+ link: "/markets/stocks",
1621
+ mediaUrl: "https://cdn.prod.website-files.com/66fbaad381fa6866fa4991f3/675a9064892f97175b724a9c_Stocks.lottie"
1622
+ },
1623
+ {
1624
+ title: "Commodities",
1625
+ description: "Trade gold, silver, oil, natural gas, sugar, and more.",
1626
+ linkLabel: "Learn more",
1627
+ link: "/markets/commodities",
1628
+ mediaUrl: "https://cdn.prod.website-files.com/66fbaad381fa6866fa4991f3/675a9064edd96a014a6092cf_Commodities.lottie"
1629
+ },
1630
+ {
1631
+ title: "Cryptos",
1632
+ description: "Trade round the clock on the volatility of cryptocurrencies like Bitcoin and Ethereum.",
1633
+ linkLabel: "Learn more",
1634
+ link: "/markets/cryptocurrencies",
1635
+ mediaUrl: "https://cdn.prod.website-files.com/66fbaad381fa6866fa4991f3/675a90647b8d9652a28b94e3_Crypto.lottie"
1636
+ },
1637
+ {
1638
+ title: "Stock Indices",
1639
+ description: "Trade offerings that track the top global stock indices.",
1640
+ linkLabel: "Learn more",
1641
+ link: "/markets/stock-indices",
1642
+ mediaUrl: "https://cdn.prod.website-files.com/66fbaad381fa6866fa4991f3/675a9064f2c16e4e0732abfb_Stock%20Indices.lottie"
1643
+ }
1644
+ ];
1645
+ var ChevronRight2 = () => /* @__PURE__ */ jsx20(
1646
+ "svg",
1647
+ {
1648
+ className: "scrolly__item-link-icon",
1649
+ width: "16",
1650
+ height: "16",
1651
+ viewBox: "0 0 16 16",
1652
+ fill: "none",
1653
+ "aria-hidden": "true",
1654
+ children: /* @__PURE__ */ jsx20(
1655
+ "path",
1656
+ {
1657
+ d: "M6 3l5 5-5 5",
1658
+ stroke: "currentColor",
1659
+ strokeWidth: "1.5",
1660
+ strokeLinecap: "round",
1661
+ strokeLinejoin: "round"
1662
+ }
1663
+ )
1664
+ }
1665
+ );
1666
+ function resolveMediaType(item) {
1667
+ if (item.mediaType) return item.mediaType;
1668
+ return item.mediaUrl.split("?")[0].endsWith(".lottie") ? "lottie" : "image";
1669
+ }
1670
+ var MediaRenderer = ({ item, active }) => {
1671
+ if (resolveMediaType(item) === "lottie") {
1672
+ return /* @__PURE__ */ jsx20(
1673
+ DotLottieReact,
1674
+ {
1675
+ src: item.mediaUrl,
1676
+ loop: true,
1677
+ autoplay: active
1678
+ }
1679
+ );
1680
+ }
1681
+ return /* @__PURE__ */ jsx20(
1682
+ "img",
1683
+ {
1684
+ src: item.mediaUrl,
1685
+ alt: item.title,
1686
+ loading: "lazy"
1687
+ }
1688
+ );
1689
+ };
1690
+ var Scrollytelling = ({
1691
+ header,
1692
+ items,
1693
+ variant = "media-right",
1694
+ className,
1695
+ ...props
1696
+ }) => {
1697
+ const [activeIndex, setActiveIndex] = useState7(0);
1698
+ const itemRefs = useRef4([]);
1699
+ useEffect4(() => {
1700
+ const elements = itemRefs.current.filter(Boolean);
1701
+ if (!elements.length) return;
1702
+ const observer = new IntersectionObserver(
1703
+ (entries) => {
1704
+ entries.forEach((entry) => {
1705
+ if (entry.isIntersecting) {
1706
+ const idx = itemRefs.current.indexOf(
1707
+ entry.target
1708
+ );
1709
+ if (idx !== -1) setActiveIndex(idx);
1710
+ }
1711
+ });
1712
+ },
1713
+ {
1714
+ /* Fire when 50 % of the text block is visible.
1715
+ rootMargin trims the effective viewport to its
1716
+ middle third, preventing accidental fires when
1717
+ items are only just entering / leaving the screen. */
1718
+ threshold: 0.5,
1719
+ rootMargin: "-15% 0px -15% 0px"
1720
+ }
1721
+ );
1722
+ elements.forEach((el) => observer.observe(el));
1723
+ return () => observer.disconnect();
1724
+ }, [items.length]);
1725
+ const rootClass = [
1726
+ "scrolly",
1727
+ `scrolly--${variant}`,
1728
+ className
1729
+ ].filter(Boolean).join(" ");
1730
+ return /* @__PURE__ */ jsx20("section", { className: rootClass, ...props, children: /* @__PURE__ */ jsxs19("div", { className: "scrolly__inner", children: [
1731
+ /* @__PURE__ */ jsx20("h2", { className: "scrolly__header", children: header }),
1732
+ /* @__PURE__ */ jsxs19("div", { className: "scrolly__layout", children: [
1733
+ /* @__PURE__ */ jsx20("div", { className: "scrolly__media-col", "aria-hidden": "true", children: /* @__PURE__ */ jsx20("div", { className: "scrolly__media-wrap", children: items.map((item, i) => /* @__PURE__ */ jsx20(
1734
+ "div",
1735
+ {
1736
+ className: [
1737
+ "scrolly__media-item",
1738
+ i === activeIndex ? "scrolly__media-item--active" : ""
1739
+ ].filter(Boolean).join(" "),
1740
+ children: /* @__PURE__ */ jsx20(
1741
+ MediaRenderer,
1742
+ {
1743
+ item,
1744
+ active: i === activeIndex
1745
+ }
1746
+ )
1747
+ },
1748
+ i
1749
+ )) }) }),
1750
+ /* @__PURE__ */ jsx20("div", { className: "scrolly__content-col", children: items.map((item, i) => /* @__PURE__ */ jsxs19(
1751
+ "div",
1752
+ {
1753
+ ref: (el) => {
1754
+ itemRefs.current[i] = el;
1755
+ },
1756
+ className: [
1757
+ "scrolly__item",
1758
+ i === activeIndex ? "scrolly__item--active" : "scrolly__item--inactive"
1759
+ ].join(" "),
1760
+ children: [
1761
+ /* @__PURE__ */ jsx20("h3", { className: "scrolly__item-title", children: item.title }),
1762
+ /* @__PURE__ */ jsx20("p", { className: "scrolly__item-desc", children: item.description }),
1763
+ /* @__PURE__ */ jsxs19(
1764
+ "a",
1765
+ {
1766
+ href: item.link,
1767
+ className: "scrolly__item-link",
1768
+ children: [
1769
+ /* @__PURE__ */ jsx20("span", { children: item.linkLabel }),
1770
+ /* @__PURE__ */ jsx20(ChevronRight2, {})
1771
+ ]
1772
+ }
1773
+ )
1774
+ ]
1775
+ },
1776
+ i
1777
+ )) })
1778
+ ] }),
1779
+ /* @__PURE__ */ jsx20("div", { className: "scrolly__mobile-list", children: items.map((item, i) => /* @__PURE__ */ jsxs19("div", { className: "scrolly__mobile-item", children: [
1780
+ /* @__PURE__ */ jsx20("h3", { className: "scrolly__item-title", children: item.title }),
1781
+ /* @__PURE__ */ jsx20("p", { className: "scrolly__item-desc", children: item.description }),
1782
+ /* @__PURE__ */ jsxs19(
1783
+ "a",
1784
+ {
1785
+ href: item.link,
1786
+ className: "scrolly__item-link",
1787
+ children: [
1788
+ /* @__PURE__ */ jsx20("span", { children: "Learn more" }),
1789
+ /* @__PURE__ */ jsx20(ChevronRight2, {})
1790
+ ]
1791
+ }
1792
+ ),
1793
+ /* @__PURE__ */ jsx20("div", { className: "scrolly__mobile-media", children: /* @__PURE__ */ jsx20(MediaRenderer, { item, active: true }) })
1794
+ ] }, i)) })
1795
+ ] }) });
1796
+ };
1797
+
1798
+ // templates/StickyStackedCards/StickyStackedCards.tsx
1799
+ import { useEffect as useEffect5, useRef as useRef5 } from "react";
1800
+ import { jsx as jsx21, jsxs as jsxs20 } from "react/jsx-runtime";
1801
+ var STEPS_DATA = [
1802
+ {
1803
+ title: "Sign up",
1804
+ description: "Sign up in minutes. Practise with a zero-risk demo account.",
1805
+ imageUrl: "https://cdn.prod.website-files.com/66585fe0e1dc7e70cc75d440/677cfad9dd757e95ee7fb4d9_image%20phone.webp",
1806
+ theme: "light"
1807
+ },
1808
+ {
1809
+ title: "Deposit",
1810
+ description: "Use your favourite local payment method to fund your account.",
1811
+ imageUrl: "https://cdn.prod.website-files.com/66585fe0e1dc7e70cc75d440/6757df583bf331c84b6c6a61_card-2.webp",
1812
+ theme: "coral"
1813
+ },
1814
+ {
1815
+ title: "Trade",
1816
+ description: "Start your trading journey.",
1817
+ imageUrl: "https://cdn.prod.website-files.com/66585fe0e1dc7e70cc75d440/6757df583bf331c84b6c6a59_card-3.webp",
1818
+ theme: "dark"
1819
+ }
1820
+ ];
1821
+ var MIN_SCALE = { 0: 0.88, 1: 0.94 };
1822
+ var StickyStackedCards = ({
1823
+ header,
1824
+ items,
1825
+ className,
1826
+ ...props
1827
+ }) => {
1828
+ const cardRefs = useRef5([]);
1829
+ useEffect5(() => {
1830
+ if (typeof window === "undefined") return;
1831
+ let rafId = 0;
1832
+ const update = () => {
1833
+ const cards = cardRefs.current.filter(Boolean);
1834
+ const n = cards.length;
1835
+ cards.forEach((card, i) => {
1836
+ const minScale = MIN_SCALE[i];
1837
+ if (minScale === void 0) {
1838
+ card.style.setProperty("--card-scale", "1");
1839
+ return;
1840
+ }
1841
+ const nextCard = cards[i + 1];
1842
+ if (!nextCard) return;
1843
+ const cardRect = card.getBoundingClientRect();
1844
+ const nextRect = nextCard.getBoundingClientRect();
1845
+ const cardHeight = cardRect.height;
1846
+ const gap = nextRect.top - cardRect.top;
1847
+ const progress = Math.max(0, Math.min(1, 1 - gap / cardHeight));
1848
+ const scale = 1 - (1 - minScale) * progress;
1849
+ card.style.setProperty("--card-scale", String(+scale.toFixed(4)));
1850
+ });
1851
+ };
1852
+ const onScroll = () => {
1853
+ cancelAnimationFrame(rafId);
1854
+ rafId = requestAnimationFrame(update);
1855
+ };
1856
+ window.addEventListener("scroll", onScroll, { passive: true });
1857
+ update();
1858
+ return () => {
1859
+ window.removeEventListener("scroll", onScroll);
1860
+ cancelAnimationFrame(rafId);
1861
+ };
1862
+ }, [items.length]);
1863
+ return /* @__PURE__ */ jsx21(
1864
+ "section",
1865
+ {
1866
+ className: ["ssc", className].filter(Boolean).join(" "),
1867
+ ...props,
1868
+ children: /* @__PURE__ */ jsxs20("div", { className: "ssc__inner", children: [
1869
+ /* @__PURE__ */ jsx21("h2", { className: "ssc__header", children: header }),
1870
+ /* @__PURE__ */ jsx21("div", { className: "ssc__track", children: items.map((item, i) => /* @__PURE__ */ jsxs20(
1871
+ "div",
1872
+ {
1873
+ ref: (el) => {
1874
+ cardRefs.current[i] = el;
1875
+ },
1876
+ className: [
1877
+ "ssc__card",
1878
+ `ssc__card--${item.theme ?? "light"}`
1879
+ ].join(" "),
1880
+ style: {
1881
+ zIndex: i + 1,
1882
+ /*
1883
+ * PEEK OFFSET — every card gets i × peek-offset so each
1884
+ * prior card shows as a thin strip at the top of the next.
1885
+ *
1886
+ * Example with 3 cards, peek = 16px:
1887
+ * Card 0 (Sign up) → 80px
1888
+ * Card 1 (Deposit) → 96px (Sign up peeks 16px above)
1889
+ * Card 2 (Trade) → 112px (Deposit peeks 16px, Sign up 32px above)
1890
+ *
1891
+ * Final state: two 16px colour strips at top, Trade fills the rest.
1892
+ */
1893
+ top: `calc(var(--ssc-sticky-top) + ${i} * var(--ssc-peek-offset))`
1894
+ },
1895
+ children: [
1896
+ /* @__PURE__ */ jsxs20("div", { className: "ssc__card-content", children: [
1897
+ /* @__PURE__ */ jsx21("h3", { className: "ssc__card-title", children: item.title }),
1898
+ /* @__PURE__ */ jsx21("p", { className: "ssc__card-desc", children: item.description })
1899
+ ] }),
1900
+ /* @__PURE__ */ jsx21("div", { className: "ssc__card-image", children: /* @__PURE__ */ jsx21(
1901
+ "img",
1902
+ {
1903
+ src: item.imageUrl,
1904
+ alt: item.title,
1905
+ loading: i === 0 ? "eager" : "lazy"
1906
+ }
1907
+ ) })
1908
+ ]
1909
+ },
1910
+ i
1911
+ )) })
1912
+ ] })
1913
+ }
1914
+ );
1915
+ };
1916
+
1917
+ // templates/CTABanner/CTABanner.tsx
1918
+ import { useRef as useRef6 } from "react";
1919
+ import {
1920
+ motion,
1921
+ useScroll,
1922
+ useSpring,
1923
+ useTransform,
1924
+ useMotionTemplate
1925
+ } from "framer-motion";
1926
+ import { jsx as jsx22, jsxs as jsxs21 } from "react/jsx-runtime";
1927
+ var ENTRANCE = {
1928
+ near: 80,
1929
+ mid: 130,
1930
+ far: 180,
1931
+ edge: 240,
1932
+ blurStart: 28
1933
+ };
1934
+ var SPRING = { stiffness: 80, damping: 30, restDelta: 1e-3 };
1935
+ var LOCK_AT = 0.5;
1936
+ var PLACEHOLDER_URL = "https://cdn.prod.website-files.com/68da5c86c91c54f39c86c28a/68da5c86c91c54f39c86ce1a_footer-member-5.webp";
1937
+ var AVATAR_DATA = [
1938
+ /* ── Rank 0 — top-centre (col 6, row 1) ─────── */
1939
+ {
1940
+ id: 12,
1941
+ staggerRank: 0,
1942
+ imageUrl: PLACEHOLDER_URL,
1943
+ desktopPos: { left: "calc(var(--ctab-grid-cell) * 6)", top: "calc(var(--ctab-grid-cell) * 1)" },
1944
+ mobilePos: { left: "calc(50% - var(--ctab-avatar-size) / 2)", top: "calc(var(--ctab-grid-cell) * 1)" },
1945
+ mobileVisible: true
1946
+ },
1947
+ /* ── Rank 1 — bot-centre (col 6, row 7) ─────── */
1948
+ {
1949
+ id: 11,
1950
+ staggerRank: 1,
1951
+ imageUrl: PLACEHOLDER_URL,
1952
+ desktopPos: { left: "calc(var(--ctab-grid-cell) * 6)", top: "calc(var(--ctab-grid-cell) * 7)" },
1953
+ mobilePos: null,
1954
+ mobileVisible: false
1955
+ },
1956
+ /* ── Rank 2 — upper-inner-left (col 3, row 2) ── */
1957
+ {
1958
+ id: 3,
1959
+ staggerRank: 2,
1960
+ imageUrl: PLACEHOLDER_URL,
1961
+ desktopPos: { left: "calc(var(--ctab-grid-cell) * 3)", top: "calc(var(--ctab-grid-cell) * 2)" },
1962
+ mobilePos: { left: "0", top: "calc(var(--ctab-grid-cell) * 2)" },
1963
+ mobileVisible: true
1964
+ },
1965
+ /* ── Rank 3 — upper-inner-right (col 9, row 2) ── */
1966
+ {
1967
+ id: 6,
1968
+ staggerRank: 3,
1969
+ imageUrl: PLACEHOLDER_URL,
1970
+ desktopPos: { left: "calc(var(--ctab-grid-cell) * 9)", top: "calc(var(--ctab-grid-cell) * 2)" },
1971
+ mobilePos: { right: "0", top: "calc(var(--ctab-grid-cell) * 2)" },
1972
+ mobileVisible: true
1973
+ },
1974
+ /* ── Rank 4 — lower-inner-left (col 3, row 6) ── */
1975
+ {
1976
+ id: 1,
1977
+ staggerRank: 4,
1978
+ imageUrl: PLACEHOLDER_URL,
1979
+ desktopPos: { left: "calc(var(--ctab-grid-cell) * 3)", top: "calc(var(--ctab-grid-cell) * 6)" },
1980
+ mobilePos: { left: "calc(50% - var(--ctab-avatar-size) / 2)", top: "calc(var(--ctab-grid-cell) * 9)" },
1981
+ mobileVisible: true
1982
+ },
1983
+ /* ── Rank 5 — lower-inner-right (col 9, row 6) ── */
1984
+ {
1985
+ id: 10,
1986
+ staggerRank: 5,
1987
+ imageUrl: PLACEHOLDER_URL,
1988
+ desktopPos: { left: "calc(var(--ctab-grid-cell) * 9)", top: "calc(var(--ctab-grid-cell) * 6)" },
1989
+ mobilePos: null,
1990
+ mobileVisible: false
1991
+ },
1992
+ /* ── Rank 6 — mid-left (col 0, row 4) ──────── */
1993
+ {
1994
+ id: 5,
1995
+ staggerRank: 6,
1996
+ imageUrl: PLACEHOLDER_URL,
1997
+ desktopPos: { left: "0", top: "calc(var(--ctab-grid-cell) * 4)" },
1998
+ mobilePos: { left: "0", top: "calc(var(--ctab-grid-cell) * 8)" },
1999
+ mobileVisible: true
2000
+ },
2001
+ /* ── Rank 7 — mid-right (col 12, row 4) ────── */
2002
+ {
2003
+ id: 8,
2004
+ staggerRank: 7,
2005
+ imageUrl: PLACEHOLDER_URL,
2006
+ desktopPos: { left: "calc(var(--ctab-grid-cell) * 12)", top: "calc(var(--ctab-grid-cell) * 4)" },
2007
+ mobilePos: { right: "0", top: "calc(var(--ctab-grid-cell) * 8)" },
2008
+ mobileVisible: true
2009
+ },
2010
+ /* ── Rank 8 — top-left corner (col 0, row 1) ── */
2011
+ {
2012
+ id: 4,
2013
+ staggerRank: 8,
2014
+ imageUrl: PLACEHOLDER_URL,
2015
+ desktopPos: { left: "0", top: "calc(var(--ctab-grid-cell) * 1)" },
2016
+ mobilePos: null,
2017
+ mobileVisible: false
2018
+ },
2019
+ /* ── Rank 9 — top-right corner (col 12, row 1) ── */
2020
+ {
2021
+ id: 7,
2022
+ staggerRank: 9,
2023
+ imageUrl: PLACEHOLDER_URL,
2024
+ desktopPos: { left: "calc(var(--ctab-grid-cell) * 12)", top: "calc(var(--ctab-grid-cell) * 1)" },
2025
+ mobilePos: null,
2026
+ mobileVisible: false
2027
+ },
2028
+ /* ── Rank 10 — bot-left corner (col 0, row 7) ── */
2029
+ {
2030
+ id: 2,
2031
+ staggerRank: 10,
2032
+ imageUrl: PLACEHOLDER_URL,
2033
+ desktopPos: { left: "0", top: "calc(var(--ctab-grid-cell) * 7)" },
2034
+ mobilePos: null,
2035
+ mobileVisible: false
2036
+ },
2037
+ /* ── Rank 11 — bot-right corner (col 12, row 7) ── */
2038
+ {
2039
+ id: 9,
2040
+ staggerRank: 11,
2041
+ imageUrl: PLACEHOLDER_URL,
2042
+ desktopPos: { left: "calc(var(--ctab-grid-cell) * 12)", top: "calc(var(--ctab-grid-cell) * 7)" },
2043
+ mobilePos: null,
2044
+ mobileVisible: false
2045
+ }
2046
+ ];
2047
+ var COMPACT_AVATAR_DATA = [
2048
+ /* ── Rank 0 — top-centre (col ~6, row 1) ── */
2049
+ {
2050
+ id: 12,
2051
+ staggerRank: 0,
2052
+ imageUrl: PLACEHOLDER_URL,
2053
+ desktopPos: { left: "calc(50% - var(--ctab-avatar-size) / 2)", top: "calc(var(--ctab-grid-cell) * 1)" },
2054
+ mobilePos: { left: "calc(50% - var(--ctab-avatar-size) / 2)", top: "calc(var(--ctab-grid-cell) * 1)" },
2055
+ mobileVisible: true
2056
+ },
2057
+ /* ── Rank 1 — top-left (col 2, row 1) ───── */
2058
+ {
2059
+ id: 3,
2060
+ staggerRank: 1,
2061
+ imageUrl: PLACEHOLDER_URL,
2062
+ desktopPos: { left: "calc(var(--ctab-grid-cell) * 2)", top: "calc(var(--ctab-grid-cell) * 1)" },
2063
+ mobilePos: { left: "0", top: "calc(var(--ctab-grid-cell) * 2)" },
2064
+ mobileVisible: true
2065
+ },
2066
+ /* ── Rank 2 — top-right (col 10, row 1) ─── */
2067
+ {
2068
+ id: 6,
2069
+ staggerRank: 2,
2070
+ imageUrl: PLACEHOLDER_URL,
2071
+ desktopPos: { left: "calc(var(--ctab-grid-cell) * 10)", top: "calc(var(--ctab-grid-cell) * 1)" },
2072
+ mobilePos: { right: "0", top: "calc(var(--ctab-grid-cell) * 2)" },
2073
+ mobileVisible: true
2074
+ },
2075
+ /* ── Rank 3 — mid-left (col 0, row 3) ────── */
2076
+ {
2077
+ id: 5,
2078
+ staggerRank: 3,
2079
+ imageUrl: PLACEHOLDER_URL,
2080
+ desktopPos: { left: "0", top: "calc(var(--ctab-grid-cell) * 3)" },
2081
+ mobilePos: { left: "0", top: "calc(var(--ctab-grid-cell) * 8)" },
2082
+ mobileVisible: true
2083
+ },
2084
+ /* ── Rank 4 — mid-right (col 12, row 3) ──── */
2085
+ {
2086
+ id: 8,
2087
+ staggerRank: 4,
2088
+ imageUrl: PLACEHOLDER_URL,
2089
+ desktopPos: { left: "calc(var(--ctab-grid-cell) * 12)", top: "calc(var(--ctab-grid-cell) * 3)" },
2090
+ mobilePos: { right: "0", top: "calc(var(--ctab-grid-cell) * 8)" },
2091
+ mobileVisible: true
2092
+ },
2093
+ /* ── Rank 5 — bot-left (col 2, row 5) ────── */
2094
+ {
2095
+ id: 1,
2096
+ staggerRank: 5,
2097
+ imageUrl: PLACEHOLDER_URL,
2098
+ desktopPos: { left: "calc(var(--ctab-grid-cell) * 2)", top: "calc(var(--ctab-grid-cell) * 5)" },
2099
+ mobilePos: { left: "calc(50% - var(--ctab-avatar-size) / 2)", top: "calc(var(--ctab-grid-cell) * 9)" },
2100
+ mobileVisible: true
2101
+ },
2102
+ /* ── Rank 6 — bot-right (col 10, row 5) — desktop only ─── */
2103
+ {
2104
+ id: 11,
2105
+ staggerRank: 6,
2106
+ imageUrl: PLACEHOLDER_URL,
2107
+ desktopPos: { left: "calc(var(--ctab-grid-cell) * 10)", top: "calc(var(--ctab-grid-cell) * 5)" },
2108
+ mobilePos: null,
2109
+ mobileVisible: false
2110
+ }
2111
+ ];
2112
+ function useAvatarYValues(smooth) {
2113
+ const y0 = useTransform(smooth, [0, LOCK_AT], [-ENTRANCE.near, 0]);
2114
+ const y1 = useTransform(smooth, [0, LOCK_AT], [ENTRANCE.near, 0]);
2115
+ const y2 = useTransform(smooth, [0, LOCK_AT], [-ENTRANCE.mid, 0]);
2116
+ const y3 = useTransform(smooth, [0, LOCK_AT], [-ENTRANCE.mid, 0]);
2117
+ const y4 = useTransform(smooth, [0, LOCK_AT], [ENTRANCE.mid, 0]);
2118
+ const y5 = useTransform(smooth, [0, LOCK_AT], [ENTRANCE.mid, 0]);
2119
+ const y6 = useTransform(smooth, [0, LOCK_AT], [0, 0]);
2120
+ const y7 = useTransform(smooth, [0, LOCK_AT], [0, 0]);
2121
+ const y8 = useTransform(smooth, [0, LOCK_AT], [-ENTRANCE.edge, 0]);
2122
+ const y9 = useTransform(smooth, [0, LOCK_AT], [-ENTRANCE.edge, 0]);
2123
+ const y10 = useTransform(smooth, [0, LOCK_AT], [ENTRANCE.edge, 0]);
2124
+ const y11 = useTransform(smooth, [0, LOCK_AT], [ENTRANCE.edge, 0]);
2125
+ return [y0, y1, y2, y3, y4, y5, y6, y7, y8, y9, y10, y11];
2126
+ }
2127
+ function useAvatarXValues(smooth) {
2128
+ const x0 = useTransform(smooth, [0, LOCK_AT], [0, 0]);
2129
+ const x1 = useTransform(smooth, [0, LOCK_AT], [0, 0]);
2130
+ const x2 = useTransform(smooth, [0, LOCK_AT], [-ENTRANCE.mid, 0]);
2131
+ const x3 = useTransform(smooth, [0, LOCK_AT], [ENTRANCE.mid, 0]);
2132
+ const x4 = useTransform(smooth, [0, LOCK_AT], [-ENTRANCE.mid, 0]);
2133
+ const x5 = useTransform(smooth, [0, LOCK_AT], [ENTRANCE.mid, 0]);
2134
+ const x6 = useTransform(smooth, [0, LOCK_AT], [-ENTRANCE.far, 0]);
2135
+ const x7 = useTransform(smooth, [0, LOCK_AT], [ENTRANCE.far, 0]);
2136
+ const x8 = useTransform(smooth, [0, LOCK_AT], [-ENTRANCE.edge, 0]);
2137
+ const x9 = useTransform(smooth, [0, LOCK_AT], [ENTRANCE.edge, 0]);
2138
+ const x10 = useTransform(smooth, [0, LOCK_AT], [-ENTRANCE.edge, 0]);
2139
+ const x11 = useTransform(smooth, [0, LOCK_AT], [ENTRANCE.edge, 0]);
2140
+ return [x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11];
2141
+ }
2142
+ function useCompactAvatarYValues(smooth) {
2143
+ const y0 = useTransform(smooth, [0, LOCK_AT], [-ENTRANCE.near, 0]);
2144
+ const y1 = useTransform(smooth, [0, LOCK_AT], [-ENTRANCE.mid, 0]);
2145
+ const y2 = useTransform(smooth, [0, LOCK_AT], [-ENTRANCE.mid, 0]);
2146
+ const y3 = useTransform(smooth, [0, LOCK_AT], [0, 0]);
2147
+ const y4 = useTransform(smooth, [0, LOCK_AT], [0, 0]);
2148
+ const y5 = useTransform(smooth, [0, LOCK_AT], [ENTRANCE.mid, 0]);
2149
+ const y6 = useTransform(smooth, [0, LOCK_AT], [ENTRANCE.mid, 0]);
2150
+ return [y0, y1, y2, y3, y4, y5, y6];
2151
+ }
2152
+ function useCompactAvatarXValues(smooth) {
2153
+ const x0 = useTransform(smooth, [0, LOCK_AT], [0, 0]);
2154
+ const x1 = useTransform(smooth, [0, LOCK_AT], [-ENTRANCE.mid, 0]);
2155
+ const x2 = useTransform(smooth, [0, LOCK_AT], [ENTRANCE.mid, 0]);
2156
+ const x3 = useTransform(smooth, [0, LOCK_AT], [-ENTRANCE.far, 0]);
2157
+ const x4 = useTransform(smooth, [0, LOCK_AT], [ENTRANCE.far, 0]);
2158
+ const x5 = useTransform(smooth, [0, LOCK_AT], [-ENTRANCE.mid, 0]);
2159
+ const x6 = useTransform(smooth, [0, LOCK_AT], [ENTRANCE.mid, 0]);
2160
+ return [x0, x1, x2, x3, x4, x5, x6];
2161
+ }
2162
+ var CTABanner = ({
2163
+ headline = "Short section title goes here",
2164
+ ctaLabel = "Open account",
2165
+ ctaHref = "#",
2166
+ avatars,
2167
+ variant = "standard",
2168
+ className,
2169
+ ...props
2170
+ }) => {
2171
+ const resolvedAvatars = avatars ?? (variant === "compact" ? COMPACT_AVATAR_DATA : AVATAR_DATA);
2172
+ const sectionRef = useRef6(null);
2173
+ const { scrollYProgress } = useScroll({
2174
+ target: sectionRef,
2175
+ offset: ["start end", "end start"]
2176
+ });
2177
+ const smooth = useSpring(scrollYProgress, SPRING);
2178
+ const gridOpacity = useTransform(smooth, [0, 0.3], [0, 1]);
2179
+ const heroY = useTransform(smooth, [0, LOCK_AT], [32, 0]);
2180
+ const heroOpacity = useTransform(smooth, [0, 0.3], [0, 1]);
2181
+ const avatarOpacity = useTransform(smooth, [0, 0.25], [0, 1]);
2182
+ const blurPx = useTransform(smooth, [0, 0.3, 0.7, 1], [ENTRANCE.blurStart, 0, 0, ENTRANCE.blurStart]);
2183
+ const avatarFilter = useMotionTemplate`blur(${blurPx}px)`;
2184
+ const standardYValues = useAvatarYValues(smooth);
2185
+ const standardXValues = useAvatarXValues(smooth);
2186
+ const compactYValues = useCompactAvatarYValues(smooth);
2187
+ const compactXValues = useCompactAvatarXValues(smooth);
2188
+ const avatarYValues = variant === "compact" ? compactYValues : standardYValues;
2189
+ const avatarXValues = variant === "compact" ? compactXValues : standardXValues;
2190
+ return /* @__PURE__ */ jsxs21(
2191
+ "section",
2192
+ {
2193
+ ref: sectionRef,
2194
+ className: ["ctab", variant === "compact" ? "ctab--compact" : "", className].filter(Boolean).join(" "),
2195
+ ...props,
2196
+ children: [
2197
+ /* @__PURE__ */ jsx22(
2198
+ motion.div,
2199
+ {
2200
+ className: "ctab__grid",
2201
+ style: { opacity: gridOpacity },
2202
+ "aria-hidden": "true"
2203
+ }
2204
+ ),
2205
+ /* @__PURE__ */ jsx22("div", { className: "ctab__inner", children: /* @__PURE__ */ jsxs21("div", { className: "ctab__stage", children: [
2206
+ resolvedAvatars.map((avatar, index) => {
2207
+ const posStyle = {};
2208
+ if (avatar.desktopPos.left) posStyle["--av-d-left"] = avatar.desktopPos.left;
2209
+ if (avatar.desktopPos.right) posStyle["--av-d-right"] = avatar.desktopPos.right;
2210
+ if (avatar.desktopPos.top) posStyle["--av-d-top"] = avatar.desktopPos.top;
2211
+ if (avatar.mobilePos?.left) posStyle["--av-m-left"] = avatar.mobilePos.left;
2212
+ if (avatar.mobilePos?.right) posStyle["--av-m-right"] = avatar.mobilePos.right;
2213
+ if (avatar.mobilePos?.top) posStyle["--av-m-top"] = avatar.mobilePos.top;
2214
+ return /* @__PURE__ */ jsx22(
2215
+ motion.div,
2216
+ {
2217
+ className: [
2218
+ "ctab__avatar",
2219
+ !avatar.mobileVisible ? "ctab__avatar--desktop-only" : ""
2220
+ ].filter(Boolean).join(" "),
2221
+ style: {
2222
+ ...posStyle,
2223
+ x: avatarXValues[index],
2224
+ y: avatarYValues[index],
2225
+ opacity: avatarOpacity,
2226
+ filter: avatarFilter
2227
+ },
2228
+ children: /* @__PURE__ */ jsx22(
2229
+ "img",
2230
+ {
2231
+ src: avatar.imageUrl,
2232
+ alt: "",
2233
+ loading: "lazy",
2234
+ draggable: false
2235
+ }
2236
+ )
2237
+ },
2238
+ avatar.id
2239
+ );
2240
+ }),
2241
+ /* @__PURE__ */ jsxs21(
2242
+ motion.div,
2243
+ {
2244
+ className: "ctab__hero",
2245
+ style: { y: heroY, opacity: heroOpacity },
2246
+ children: [
2247
+ /* @__PURE__ */ jsx22("h2", { className: "ctab__headline", children: headline }),
2248
+ /* @__PURE__ */ jsx22("a", { href: ctaHref, className: "ctab__cta", children: ctaLabel })
2249
+ ]
2250
+ }
2251
+ )
2252
+ ] }) })
2253
+ ]
2254
+ }
2255
+ );
2256
+ };
2257
+
2258
+ // templates/DayNightTransition/DayNightTransition.tsx
2259
+ import { useRef as useRef7 } from "react";
2260
+ import {
2261
+ motion as motion2,
2262
+ useScroll as useScroll2,
2263
+ useSpring as useSpring2,
2264
+ useTransform as useTransform2,
2265
+ useMotionTemplate as useMotionTemplate2
2266
+ } from "framer-motion";
2267
+ import { jsx as jsx23, jsxs as jsxs22 } from "react/jsx-runtime";
2268
+ var SPRING2 = { stiffness: 80, damping: 30, restDelta: 1e-3 };
2269
+ var FADE_START = 0.35;
2270
+ var FADE_END = 0.65;
2271
+ var WORD_START = 0.4;
2272
+ var WORD_END = 0.6;
2273
+ var TEXT_CHANNEL_DAY = 0;
2274
+ var TEXT_CHANNEL_NIGHT = 255;
2275
+ var DayNightTransition = ({
2276
+ dayImageUrl,
2277
+ nightImageUrl,
2278
+ dayHeadline = "Trade all day",
2279
+ nightHeadline = "Trade all night",
2280
+ dayDescription,
2281
+ nightDescription,
2282
+ ctaLabel = "Get started",
2283
+ ctaHref = "#",
2284
+ className,
2285
+ ...props
2286
+ }) => {
2287
+ const wrapperRef = useRef7(null);
2288
+ const { scrollYProgress } = useScroll2({
2289
+ target: wrapperRef,
2290
+ offset: ["start end", "end start"]
2291
+ });
2292
+ const smooth = useSpring2(scrollYProgress, SPRING2);
2293
+ const nightOpacity = useTransform2(smooth, [FADE_START, FADE_END], [0, 1]);
2294
+ const channel = useTransform2(smooth, [FADE_START, FADE_END], [TEXT_CHANNEL_DAY, TEXT_CHANNEL_NIGHT]);
2295
+ const textColor = useMotionTemplate2`rgb(${channel}, ${channel}, ${channel})`;
2296
+ const dayOpacity = useTransform2(smooth, [WORD_START, WORD_END], [1, 0]);
2297
+ const nightOpacity2 = useTransform2(smooth, [WORD_START, WORD_END], [0, 1]);
2298
+ const hasDescription = Boolean(dayDescription || nightDescription);
2299
+ return /* @__PURE__ */ jsx23(
2300
+ "div",
2301
+ {
2302
+ ref: wrapperRef,
2303
+ className: ["dnt", className].filter(Boolean).join(" "),
2304
+ ...props,
2305
+ children: /* @__PURE__ */ jsxs22("div", { className: "dnt__sticky", children: [
2306
+ /* @__PURE__ */ jsx23(
2307
+ "img",
2308
+ {
2309
+ className: "dnt__bg dnt__bg--day",
2310
+ src: dayImageUrl,
2311
+ alt: "",
2312
+ loading: "eager",
2313
+ draggable: false
2314
+ }
2315
+ ),
2316
+ /* @__PURE__ */ jsx23(
2317
+ motion2.img,
2318
+ {
2319
+ className: "dnt__bg dnt__bg--night",
2320
+ src: nightImageUrl,
2321
+ alt: "",
2322
+ loading: "eager",
2323
+ draggable: false,
2324
+ style: { opacity: nightOpacity }
2325
+ }
2326
+ ),
2327
+ /* @__PURE__ */ jsx23("div", { className: "dnt__content", children: /* @__PURE__ */ jsxs22(
2328
+ motion2.div,
2329
+ {
2330
+ className: "dnt__text-wrap",
2331
+ style: { color: textColor },
2332
+ children: [
2333
+ /* @__PURE__ */ jsxs22("div", { className: "dnt__crossfade-wrap", children: [
2334
+ /* @__PURE__ */ jsx23(
2335
+ motion2.h2,
2336
+ {
2337
+ className: "dnt__headline",
2338
+ style: { opacity: dayOpacity },
2339
+ children: dayHeadline
2340
+ }
2341
+ ),
2342
+ /* @__PURE__ */ jsx23(
2343
+ motion2.h2,
2344
+ {
2345
+ className: "dnt__headline",
2346
+ "aria-hidden": "true",
2347
+ style: { opacity: nightOpacity2 },
2348
+ children: nightHeadline
2349
+ }
2350
+ )
2351
+ ] }),
2352
+ hasDescription && /* @__PURE__ */ jsxs22("div", { className: "dnt__crossfade-wrap", children: [
2353
+ /* @__PURE__ */ jsx23(
2354
+ motion2.p,
2355
+ {
2356
+ className: "dnt__description",
2357
+ style: { opacity: dayOpacity },
2358
+ children: dayDescription ?? ""
2359
+ }
2360
+ ),
2361
+ /* @__PURE__ */ jsx23(
2362
+ motion2.p,
2363
+ {
2364
+ className: "dnt__description",
2365
+ "aria-hidden": "true",
2366
+ style: { opacity: nightOpacity2 },
2367
+ children: nightDescription ?? ""
2368
+ }
2369
+ )
2370
+ ] }),
2371
+ /* @__PURE__ */ jsx23("a", { href: ctaHref, className: "dnt__btn", children: ctaLabel })
2372
+ ]
2373
+ }
2374
+ ) })
2375
+ ] })
2376
+ }
2377
+ );
2378
+ };
2379
+
2380
+ // templates/PaymentMethods/PaymentMethods.tsx
2381
+ import { useRef as useRef8 } from "react";
2382
+ import {
2383
+ motion as motion3,
2384
+ useScroll as useScroll3,
2385
+ useVelocity,
2386
+ useAnimationFrame,
2387
+ useMotionValue
2388
+ } from "framer-motion";
2389
+ import { jsx as jsx24, jsxs as jsxs23 } from "react/jsx-runtime";
2390
+ function modWrap(min, max, v) {
2391
+ const range = max - min;
2392
+ return ((v - min) % range + range) % range + min;
2393
+ }
2394
+ var VELOCITY_FACTOR = 0.4;
2395
+ var MAX_SCROLL_V = 2500;
2396
+ var DEADZONE = 2;
2397
+ var CDN = "https://cdn.prod.website-files.com/68da5c86c91c54f39c86c28a/";
2398
+ var COL_ONE_LOGOS = [
2399
+ { name: "Mastercard", url: `${CDN}68dcd915dc1a82f278b6c061_payment%20method-mastercard.svg` },
2400
+ { name: "Visa", url: `${CDN}68dcd9d10fda048e2d53a3a1_payment%20method-visa.svg` },
2401
+ { name: "Visa Electron", url: `${CDN}68dcd9d10fda048e2d53a3a1_payment%20method-visa-electron.svg` },
2402
+ { name: "Maestro", url: `${CDN}68dcd9d183a5dcfaa9a06587_payment%20method-maestro.svg` },
2403
+ { name: "Pix", url: `${CDN}68dcd9d13461263dcd8ccf54_payment%20method-pix.svg` },
2404
+ { name: "Help2Pay", url: `${CDN}68dcd9d13461263dcd8ccf54_payment%20method-help2pay.svg` },
2405
+ { name: "UPI Neo", url: `${CDN}68dcd9d13461263dcd8ccf54_payment%20method-upineo.svg` },
2406
+ { name: "M-Pesa", url: `${CDN}68dcd9d13461263dcd8ccf54_payment%20method-mpesa.svg` },
2407
+ { name: "Ozow", url: `${CDN}68dcd9d13461263dcd8ccf54_payment%20method-ozow.svg` },
2408
+ { name: "MTN", url: `${CDN}68dcd9d13461263dcd8ccf54_payment%20method-mtn.svg` },
2409
+ { name: "Airtm", url: `${CDN}68dcd9d13461263dcd8ccf54_payment%20method-airtm.svg` }
2410
+ ];
2411
+ var COL_TWO_LOGOS = [
2412
+ { name: "Bitcoin", url: `${CDN}68dcd9d13384aff3f072511a_payment%20method-bitcoin.svg` },
2413
+ { name: "Ethereum", url: `${CDN}68dcd9d10fda048e2d53a3a1_payment%20method-ethereum.svg` },
2414
+ { name: "Tron", url: `${CDN}68dcd9d109305b54383580e5_payment%20method-tron.svg` },
2415
+ { name: "Skrill", url: `${CDN}68dcd9d183a5dcfaa9a06587_payment%20method-skrill.svg` },
2416
+ { name: "Skrill 1-tap", url: `${CDN}68dcd9d183a5dcfaa9a06587_payment%20method-skrill-1tap.svg` },
2417
+ { name: "SticPay", url: `${CDN}68dcd9d183a5dcfaa9a06587_payment%20method-sticpay.svg` },
2418
+ { name: "Litecoin", url: `${CDN}68dcd9d13384aff3f072511a_payment%20method-litecoin.svg` },
2419
+ { name: "USD Coin", url: `${CDN}68dcd9d13384aff3f072511a_payment%20method-usdc.svg` },
2420
+ { name: "Dogecoin", url: `${CDN}68dcd9d13384aff3f072511a_payment%20method-dogecoin.svg` },
2421
+ { name: "Cardano", url: `${CDN}68dcd9d13384aff3f072511a_payment%20method-cardano.svg` },
2422
+ { name: "BNB", url: `${CDN}68dcd9d13384aff3f072511a_payment%20method-bnb.svg` }
2423
+ ];
2424
+ var TEXT_CONTENT = {
2425
+ headline: "Your money, your way",
2426
+ body: "Quick deposits, easy withdrawals, and 60+ payment options mean your money is always accessible.",
2427
+ disclaimer: "*Availability of payment methods and processing speeds may vary based on location and selected payment option.",
2428
+ ctaLabel: "Learn more",
2429
+ ctaHref: "#"
2430
+ };
2431
+ var PaymentMethods = ({
2432
+ headline = TEXT_CONTENT.headline,
2433
+ body = TEXT_CONTENT.body,
2434
+ disclaimer = TEXT_CONTENT.disclaimer,
2435
+ ctaLabel = TEXT_CONTENT.ctaLabel,
2436
+ ctaHref = TEXT_CONTENT.ctaHref,
2437
+ col1Logos = COL_ONE_LOGOS,
2438
+ col2Logos = COL_TWO_LOGOS,
2439
+ className,
2440
+ ...props
2441
+ }) => {
2442
+ const { scrollY } = useScroll3();
2443
+ const scrollVelocity = useVelocity(scrollY);
2444
+ const col1Y = useMotionValue(0);
2445
+ const col2Y = useMotionValue(0);
2446
+ const col1Ref = useRef8(null);
2447
+ const col2Ref = useRef8(null);
2448
+ useAnimationFrame((_, delta) => {
2449
+ const raw = scrollVelocity.get();
2450
+ if (Math.abs(raw) < DEADZONE) return;
2451
+ const clamped = Math.sign(raw) * Math.min(Math.abs(raw), MAX_SCROLL_V);
2452
+ const step = clamped * VELOCITY_FACTOR * (delta / 1e3);
2453
+ const cycleH1 = (col1Ref.current?.offsetHeight ?? 2e3) / 2;
2454
+ const cycleH2 = (col2Ref.current?.offsetHeight ?? 2e3) / 2;
2455
+ col1Y.set(modWrap(-cycleH1, 0, col1Y.get() - step));
2456
+ col2Y.set(modWrap(-cycleH2, 0, col2Y.get() + step));
2457
+ });
2458
+ const track1 = [...col1Logos, ...col1Logos];
2459
+ const track2 = [...col2Logos, ...col2Logos];
2460
+ return /* @__PURE__ */ jsx24(
2461
+ "section",
2462
+ {
2463
+ className: ["pm", className].filter(Boolean).join(" "),
2464
+ ...props,
2465
+ children: /* @__PURE__ */ jsxs23("div", { className: "pm__inner", children: [
2466
+ /* @__PURE__ */ jsx24("div", { className: "pm__media", children: /* @__PURE__ */ jsxs23("div", { className: "pm__carousel", children: [
2467
+ /* @__PURE__ */ jsx24("div", { className: "pm__fade pm__fade--top", "aria-hidden": "true" }),
2468
+ /* @__PURE__ */ jsx24(
2469
+ motion3.div,
2470
+ {
2471
+ ref: col1Ref,
2472
+ className: "pm__col",
2473
+ style: { y: col1Y },
2474
+ children: track1.map((logo, i) => /* @__PURE__ */ jsx24("div", { className: "pm__card", children: /* @__PURE__ */ jsx24("div", { className: "pm__card-img-wrap", children: /* @__PURE__ */ jsx24(
2475
+ "img",
2476
+ {
2477
+ src: logo.url,
2478
+ alt: logo.name,
2479
+ loading: "lazy",
2480
+ draggable: false
2481
+ }
2482
+ ) }) }, `c1-${i}`))
2483
+ }
2484
+ ),
2485
+ /* @__PURE__ */ jsx24(
2486
+ motion3.div,
2487
+ {
2488
+ ref: col2Ref,
2489
+ className: "pm__col",
2490
+ style: { y: col2Y },
2491
+ children: track2.map((logo, i) => /* @__PURE__ */ jsx24("div", { className: "pm__card", children: /* @__PURE__ */ jsx24("div", { className: "pm__card-img-wrap", children: /* @__PURE__ */ jsx24(
2492
+ "img",
2493
+ {
2494
+ src: logo.url,
2495
+ alt: logo.name,
2496
+ loading: "lazy",
2497
+ draggable: false
2498
+ }
2499
+ ) }) }, `c2-${i}`))
2500
+ }
2501
+ ),
2502
+ /* @__PURE__ */ jsx24("div", { className: "pm__fade pm__fade--bottom", "aria-hidden": "true" })
2503
+ ] }) }),
2504
+ /* @__PURE__ */ jsxs23("div", { className: "pm__content", children: [
2505
+ /* @__PURE__ */ jsx24("h2", { className: "pm__headline", children: headline }),
2506
+ /* @__PURE__ */ jsxs23("div", { className: "pm__text-group", children: [
2507
+ /* @__PURE__ */ jsx24("p", { className: "pm__body", children: body }),
2508
+ /* @__PURE__ */ jsx24("p", { className: "pm__disclaimer", children: disclaimer })
2509
+ ] }),
2510
+ /* @__PURE__ */ jsxs23("a", { href: ctaHref, className: "pm__link", children: [
2511
+ ctaLabel,
2512
+ /* @__PURE__ */ jsx24("span", { "aria-hidden": "true", children: "\u2192" })
2513
+ ] })
2514
+ ] })
2515
+ ] })
2516
+ }
2517
+ );
2518
+ };
893
2519
  export {
2520
+ AVATAR_DATA,
894
2521
  Accordion,
2522
+ BottomSheet,
895
2523
  Breadcrumb,
896
2524
  Button,
2525
+ COL_ONE_LOGOS,
2526
+ COL_TWO_LOGOS,
2527
+ CTABanner,
897
2528
  Card,
898
2529
  Chip,
899
2530
  ChipDropdown,
2531
+ DayNightTransition,
900
2532
  FeatureCards,
2533
+ Footer,
2534
+ Hero,
901
2535
  Link,
902
2536
  Pagination,
2537
+ PaymentMethods,
2538
+ SCROLLYTELLING_DATA,
2539
+ STEPS_DATA,
2540
+ Scrollytelling,
903
2541
  SearchField,
2542
+ Stats,
2543
+ StickyStackedCards,
2544
+ TEXT_CONTENT,
904
2545
  Tag,
905
2546
  TextField
906
2547
  };