@zenpatient-org/healthspan-marketing-ui 0.1.103 → 0.1.105

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (36) hide show
  1. package/dist/components/TextInput/TextInput.d.ts +1 -2
  2. package/dist/components/TextInput/index.d.ts +1 -0
  3. package/dist/components/Typography/Typography.cjs.js +1 -1
  4. package/dist/components/Typography/Typography.es.js +9 -9
  5. package/dist/healthspan-marketing-ui.css +1 -1
  6. package/dist/modules/AllInOne/AllInOne.cjs.js +1 -1
  7. package/dist/modules/AllInOne/AllInOne.es.js +193 -141
  8. package/dist/modules/AllInOne/allInOne.module.css.cjs.js +1 -1
  9. package/dist/modules/AllInOne/allInOne.module.css.es.js +14 -12
  10. package/dist/modules/CallToAction/CallToAction.cjs.js +1 -1
  11. package/dist/modules/CallToAction/CallToAction.es.js +21 -3
  12. package/dist/modules/HSModal/HSModal.cjs.js +1 -0
  13. package/dist/modules/HSModal/HSModal.d.ts +4 -0
  14. package/dist/modules/HSModal/HSModal.es.js +25 -0
  15. package/dist/modules/HSModal/components/MailchimpModal/MailchimpModal.cjs.js +1 -0
  16. package/dist/modules/HSModal/components/MailchimpModal/MailchimpModal.d.ts +3 -0
  17. package/dist/modules/HSModal/components/MailchimpModal/MailchimpModal.es.js +53 -0
  18. package/dist/modules/HSModal/components/MailchimpModal/components/Newsletter/Newsletter.cjs.js +1 -0
  19. package/dist/modules/HSModal/components/MailchimpModal/components/Newsletter/Newsletter.d.ts +8 -0
  20. package/dist/modules/HSModal/components/MailchimpModal/components/Newsletter/Newsletter.es.js +88 -0
  21. package/dist/modules/HSModal/components/MailchimpModal/components/Newsletter/index.d.ts +1 -0
  22. package/dist/modules/HSModal/components/MailchimpModal/components/Newsletter/newsletter.module.css.cjs.js +1 -0
  23. package/dist/modules/HSModal/components/MailchimpModal/components/Newsletter/newsletter.module.css.es.js +8 -0
  24. package/dist/modules/HSModal/components/MailchimpModal/components/index.d.ts +1 -0
  25. package/dist/modules/HSModal/components/MailchimpModal/index.d.ts +1 -0
  26. package/dist/modules/HSModal/components/MailchimpModal/mailchimpModal.module.css.cjs.js +1 -0
  27. package/dist/modules/HSModal/components/MailchimpModal/mailchimpModal.module.css.es.js +21 -0
  28. package/dist/modules/HSModal/components/index.d.ts +1 -0
  29. package/dist/modules/HSModal/hsModal.module.css.cjs.js +1 -0
  30. package/dist/modules/HSModal/hsModal.module.css.es.js +7 -0
  31. package/dist/modules/HSModal/index.d.ts +3 -0
  32. package/dist/modules/HSModal/types.d.ts +23 -0
  33. package/dist/modules/HSModal/useHSModal.cjs.js +1 -0
  34. package/dist/modules/HSModal/useHSModal.d.ts +20 -0
  35. package/dist/modules/HSModal/useHSModal.es.js +63 -0
  36. package/package.json +6 -1
@@ -1 +1 @@
1
- "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),B=require("../../node_modules/@gsap/react/src/index.cjs.js"),e=require("../../node_modules/gsap/index.cjs.js"),E=require("../../node_modules/gsap/ScrollTrigger.cjs.js"),p=require("react"),H=require("../../components/HighlightedTitle/HighlightedTitle.cjs.js"),V=require("../../components/Typography/Typography.cjs.js"),S=require("../../utils/cn/cn.cjs.js"),P=require("../../utils/debounce.cjs.js"),W=require("../CallToAction/CallToAction.cjs.js"),a=require("./allInOne.module.css.cjs.js");e.gsap.registerPlugin(E.ScrollTrigger);const z=["health","energy","strength","smiles","balance","sleep","miles","love","fun","years"],{title1:U,title2:G,description:Y,scrollLabels:$,images:A,subtitle:D,titleTop:F,scrollableLabels:J,titleBottom:M,descriptionText:X,hsaText:K,buttonText:Q,buttonLink:Z,backgroundImage:ee}={subtitle:t.jsx("p",{children:"YOUR LONGEVITY JOURNEY"}),titleTop:t.jsx("p",{children:"Get more"}),scrollableLabels:z,titleBottom:t.jsx("p",{children:"out of life"}),description:"It's time to shift our thinking from healthcare and lifespan to something deeper. Healthspan.",hsaText:"Healthspan is HSA/FSA Eligible",buttonText:"JOIN NOW",buttonLink:"#",backgroundImage:"https://methodical-vitality-96814f361f.media.strapiapp.com/aio_step_9_67b550bfe1.jpg",title1:t.jsx("p",{children:"Unlimited access to"}),title2:t.jsxs("p",{children:["our ",t.jsx("b",{children:"team and tools"})]}),descriptionText:"Healthspan is the only digital clinic that offers all your longevity needs in a single subscription.",scrollLabels:["Advanced labwork analysis","Research analysis","Dedicated physicians","Advanced biomarker profiling","Personalized health tracking","In house bioavailability testing","Advanced longevity protocols"],images:["https://methodical-vitality-96814f361f.media.strapiapp.com/aio_step_1_729dd70cbe.jpg","https://methodical-vitality-96814f361f.media.strapiapp.com/aio_step_2_3adf3d2087.jpg","https://methodical-vitality-96814f361f.media.strapiapp.com/aio_step_3_62002f2bdc.jpg","https://methodical-vitality-96814f361f.media.strapiapp.com/aio_step_4_e623019155.jpg","https://methodical-vitality-96814f361f.media.strapiapp.com/aio_step_5_bd81db569b.jpg","https://methodical-vitality-96814f361f.media.strapiapp.com/aio_step_6_e9d432735b.jpg","https://methodical-vitality-96814f361f.media.strapiapp.com/aio_step_7_3c396d9385.jpg","https://methodical-vitality-96814f361f.media.strapiapp.com/aio_step_8_ee8608b390.jpg","https://methodical-vitality-96814f361f.media.strapiapp.com/aio_step_9_67b550bfe1.jpg"]},te=()=>{const[L,I]=p.useState(!1),j=932,h=p.useRef(null),l=p.useRef(null),d=p.useRef(null),u=p.useRef(null),g=p.useRef(null),o=p.useRef(null),v=p.useCallback(()=>{if(!l.current||!h.current||!d.current||!u.current||!g.current||!o.current)return;const n=h.current,i=l.current,r=d.current,c=u.current,m=g.current,b=o.current,y=m.querySelectorAll("p");if(y.length===0)return;y.forEach((f,s)=>{f.style.zIndex=String(y.length-s)});const _=i.querySelectorAll("img"),R=_.length;_.forEach((f,s)=>{f.style.zIndex=String(R-s)});const T=n.scrollHeight/R,q=.8;R>0&&_.forEach((f,s)=>{const C=s*T,k=(s+1)*T-q*T;e.gsap.fromTo([f,y[s]],{opacity:1},{opacity:0,scrollTrigger:{trigger:n,start:()=>`top+=${C} top`,end:()=>`top+=${k} top`,scrub:!0}})});const w=i.getBoundingClientRect(),N=r.getBoundingClientRect(),x=n.getBoundingClientRect();e.gsap.set(m,{y:`${w.bottom-x.top+20}px`}),window.innerWidth>j?(e.gsap.set(r,{x:`${w.left-N.width-50}px`}),e.gsap.set(c,{x:`${w.right+25}px`})):(e.gsap.set(r,{top:`${x.top-c.clientHeight-25}px`}),e.gsap.set(c,{top:`${x.top-25}px`}));const O=window.getComputedStyle(i).borderRadius;e.gsap.to(i,{scale:1,scrollTrigger:{trigger:n,start:"top top",end:"95% bottom",scrub:!0,onUpdate:f=>{if(!l.current||!o.current||!r||!c)return;const s=i.getBoundingClientRect();window.innerWidth>j?(e.gsap.set(r,{x:`${s.left-N.width-50}px`}),e.gsap.set(c,{x:`${s.right+25}px`})):(e.gsap.set(r,{y:`${s.top-x.top-25}px`}),e.gsap.set(c,{y:`${s.top-x.top-25}px`})),e.gsap.set(m,{y:`${s.bottom+20}px`});const C=o.current.getBoundingClientRect();s.bottom+60>=C.top?e.gsap.to(b,{opacity:0,duration:.3}):e.gsap.to(b,{opacity:1,duration:.3}),f.progress>=.99?(e.gsap.to(i,{borderRadius:0,duration:.3,ease:"power1.inOut"}),e.gsap.to(_,{opacity:0,duration:.3,ease:"power1.inOut"})):e.gsap.to(i,{borderRadius:O,duration:.3,ease:"power1.inOut"})}},onComplete:()=>{I(!0)}})},[l,d,u,g,o]);return B.useGSAP(()=>{if(!l.current||!h.current||!d.current||!u||!g.current||!o.current)return;const n=l.current,i=d.current,r=u.current,c=g.current,m=o.current;window.innerWidth<=j?e.gsap.set(n,{aspectRatio:`${window.innerWidth} / ${window.innerHeight}`,scale:.5}):e.gsap.set(n,{scale:.3,aspectRatio:`${window.innerWidth} / ${window.innerHeight}`}),v();const b=P.default(v,600);return window.addEventListener("resize",()=>{b()}),()=>{window.removeEventListener("resize",b),e.gsap.killTweensOf([n,c,i,r,m])}},{scope:h,dependencies:[h,l,d,u,g,v]}),t.jsx("div",{className:a.default.root,children:t.jsx("div",{ref:h,className:a.default.container,children:t.jsxs("div",{className:a.default.pillContainerWrapper,children:[t.jsxs("div",{ref:l,className:S.cn("pillContainer",a.default.pillContainer),children:[A==null?void 0:A.map((n,i)=>t.jsx("img",{src:n,alt:`Image ${i+1}`},i)),t.jsx("div",{className:a.default.callToActionContainer,children:L&&t.jsx(W.CallToAction,{subtitle:D,titleTop:F,scrollableLabels:J,titleBottom:M,description:X,hsaText:K,buttonText:Q,buttonLink:Z,backgroundImage:ee})})]}),t.jsx("div",{ref:d,className:a.default.fixedHeader,children:t.jsx(H.HighlightedTitle,{className:a.default.title1,as:"div",defaultVariant:"displayXs",title:U})}),t.jsx("div",{ref:u,className:a.default.fixedHeader,children:t.jsx(H.HighlightedTitle,{className:a.default.title2,as:"div",defaultVariant:"displayXs",title:G})}),t.jsx("div",{ref:g,className:S.cn("scrollableLabels",a.default.scrollableLabels),children:$==null?void 0:$.map((n,i)=>t.jsx(V.Typography,{as:"p",defaultVariant:"labelLg",mobileVariant:"labelSm",className:a.default.scrollLabel,children:n},i))}),t.jsx("div",{ref:o,className:S.cn("description",a.default.description),children:t.jsx(H.HighlightedTitle,{as:"p",defaultVariant:"preambleMd",mobileVariant:"preambleSm",title:Y,className:a.default.descriptionText})})]})})})};exports.AllInOne=te;
1
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("react/jsx-runtime"),W=require("../../node_modules/@gsap/react/src/index.cjs.js"),e=require("../../node_modules/gsap/index.cjs.js"),V=require("../../node_modules/gsap/ScrollTrigger.cjs.js"),l=require("react"),A=require("../../components/HighlightedTitle/HighlightedTitle.cjs.js"),U=require("../../components/Typography/Typography.cjs.js"),N=require("../../utils/cn/cn.cjs.js"),G=require("../../utils/debounce.cjs.js"),Y=require("../CallToAction/CallToAction.cjs.js"),a=require("./allInOne.module.css.cjs.js");e.gsap.registerPlugin(V.ScrollTrigger);const F=["health","energy","strength","smiles","balance","sleep","miles","love","fun","years"],{title1:J,title2:X,description:K,scrollLabels:q,images:L,subtitle:Q,titleTop:Z,scrollableLabels:ee,titleBottom:te,descriptionText:ie,hsaText:se,buttonText:ae,buttonLink:oe,backgroundImage:le}={subtitle:i.jsx("p",{children:"YOUR LONGEVITY JOURNEY"}),titleTop:i.jsx("p",{children:"Get more"}),scrollableLabels:F,titleBottom:i.jsx("p",{children:"out of life"}),description:"It's time to shift our thinking from healthcare and lifespan to something deeper. Healthspan.",hsaText:"Healthspan is HSA/FSA Eligible",buttonText:"JOIN NOW",buttonLink:"#",backgroundImage:"https://methodical-vitality-96814f361f.media.strapiapp.com/aio_step_9_67b550bfe1.jpg",title1:i.jsx("p",{children:"Unlimited access to"}),title2:i.jsxs("p",{children:["our ",i.jsx("b",{children:"team and tools"})]}),descriptionText:"Healthspan is the only digital clinic that offers all your longevity needs in a single subscription.",scrollLabels:["Advanced labwork analysis","Research analysis","Dedicated physicians","Advanced biomarker profiling","Personalized health tracking","In house bioavailability testing","Advanced longevity protocols"],images:["https://methodical-vitality-96814f361f.media.strapiapp.com/aio_step_1_729dd70cbe.jpg","https://methodical-vitality-96814f361f.media.strapiapp.com/aio_step_2_3adf3d2087.jpg","https://methodical-vitality-96814f361f.media.strapiapp.com/aio_step_3_62002f2bdc.jpg","https://methodical-vitality-96814f361f.media.strapiapp.com/aio_step_4_e623019155.jpg","https://methodical-vitality-96814f361f.media.strapiapp.com/aio_step_5_bd81db569b.jpg","https://methodical-vitality-96814f361f.media.strapiapp.com/aio_step_6_e9d432735b.jpg","https://methodical-vitality-96814f361f.media.strapiapp.com/aio_step_7_3c396d9385.jpg","https://methodical-vitality-96814f361f.media.strapiapp.com/aio_step_8_ee8608b390.jpg","https://methodical-vitality-96814f361f.media.strapiapp.com/aio_step_9_67b550bfe1.jpg"]},re=()=>{const[C,I]=l.useState(!1),R=1300,x=l.useRef(null),c=l.useRef(null),f=l.useRef(null),h=l.useRef(null),m=l.useRef(null),p=l.useRef(null),v=l.useRef(!1),E=e.gsap.matchMedia();l.useEffect(()=>{v.current=C},[C]);const H=l.useCallback(()=>{if(!c.current||!x.current||!f.current||!h.current||!m.current||!p.current)return;const o=x.current,s=c.current,d=f.current,r=h.current,u=m.current,j=p.current,S=u.querySelectorAll("p");if(S.length===0)return;S.forEach((n,t)=>{n.style.zIndex=String(S.length-t)});const y=s.querySelectorAll('[data-type="image"]'),k=y.length;y.forEach((n,t)=>{n.style.zIndex=String(k-t)});const _=o.scrollHeight/k,O=.8;k>0&&y.forEach((n,t)=>{const T=t*_,b=(t+1)*_-O*_;console.log(`idx: ${t+1}, fadeStartPosition: ${T}, fadeEndPosition: ${b}`),e.gsap.fromTo([n,S[t]],{opacity:1},{opacity:0,scrollTrigger:{trigger:o,start:()=>`top+=${T} top`,end:()=>`top+=${b} top`,scrub:!0}})});const w=s.getBoundingClientRect(),P=d.getBoundingClientRect(),M=o.getBoundingClientRect();e.gsap.set(u,{y:`${w.bottom-M.top+20}px`}),E.add({isMobile:`(max-width: ${R-1}px)`,isDesktop:`(min-width: ${R}px)`},n=>{const t=n.conditions,T=t==null?void 0:t.isMobile;(t==null?void 0:t.isDesktop)&&(e.gsap.set(d,{x:`${w.left-P.width-50}px`}),e.gsap.set(r,{x:`${w.right+25}px`})),T&&(e.gsap.set(d,{top:`${w.top-r.clientHeight-25}px`}),e.gsap.set(r,{top:`${w.top-25}px`}))});const B=window.getComputedStyle(s).borderRadius;e.gsap.to(s,{scale:1,scrollTrigger:{trigger:o,start:"top top",end:"100% bottom",scrub:!0,onUpdate:n=>{if(!c.current||!p.current||!d||!r)return;const t=s.getBoundingClientRect();E.add({isMobile:`(max-width: ${R-1}px)`,isDesktop:`(min-width: ${R}px)`},b=>{const g=b.conditions,$=g==null?void 0:g.isMobile;(g==null?void 0:g.isDesktop)&&(e.gsap.set(d,{x:`${t.left-P.width-50}px`}),e.gsap.set(r,{x:`${t.right+25}px`})),$&&(e.gsap.set(d,{top:`${t.top-r.clientHeight-25}px`}),e.gsap.set(r,{top:`${t.top-25}px`}))}),e.gsap.set(u,{y:`${t.bottom+20}px`});const T=p.current.getBoundingClientRect();if(t.bottom+60>=T.top?e.gsap.to(j,{opacity:0,duration:.3}):e.gsap.to(j,{opacity:1,duration:.3}),n.progress>=.9)e.gsap.to(s,{borderRadius:0,duration:.3,ease:"power1.inOut"}),v.current||(v.current=!0,I(!0),e.gsap.to([y,u.querySelectorAll("p")],{opacity:0,duration:.8,delay:.2,ease:"power2.out",overwrite:!0}));else if(e.gsap.to(s,{borderRadius:B,duration:.3,ease:"power1.inOut"}),v.current){v.current=!1,I(!1),e.gsap.set(s,{borderRadius:B}),e.gsap.killTweensOf([y,u.querySelectorAll("p")]);const b=u.querySelectorAll("p");y.forEach((g,$)=>{const D=$*_,z=($+1)*_-O*_;e.gsap.fromTo([g,b[$]],{opacity:1},{opacity:0,scrollTrigger:{trigger:o,start:()=>`top+=${D} top`,end:()=>`top+=${z} top`,scrub:!0}})}),V.ScrollTrigger.refresh()}}}})},[c,f,h,m,p]);return W.useGSAP(()=>{if(!c.current||!x.current||!f.current||!h||!m.current||!p.current)return;const o=c.current,s=f.current,d=h.current,r=m.current,u=p.current;window.innerWidth<=R?e.gsap.set(o,{aspectRatio:`${window.innerWidth} / ${window.innerHeight}`,scale:.5}):e.gsap.set(o,{scale:.3,aspectRatio:`${window.innerWidth} / ${window.innerHeight}`}),H();const j=G.default(H,600);return window.addEventListener("resize",()=>{j()}),()=>{window.removeEventListener("resize",j),e.gsap.killTweensOf([o,r,s,d,u])}},{scope:x,dependencies:[x,c,f,h,m,H]}),i.jsx("div",{className:a.default.root,children:i.jsx("div",{ref:x,className:a.default.container,children:i.jsxs("div",{className:a.default.pillContainerWrapper,children:[i.jsxs("div",{ref:c,className:N.cn("pillContainer",a.default.pillContainer),children:[L==null?void 0:L.map((o,s)=>i.jsx("div",{className:a.default.imageBlock,"data-type":"image",style:{backgroundImage:`url(${o})`}},s)),i.jsx("div",{className:a.default.callToActionContainer,children:C&&i.jsx(Y.CallToAction,{subtitle:Q,titleTop:Z,scrollableLabels:ee,titleBottom:te,description:ie,hsaText:se,buttonText:ae,buttonLink:oe,backgroundImage:le})})]}),i.jsx("div",{ref:f,className:a.default.fixedHeader,children:i.jsx(A.HighlightedTitle,{className:a.default.title1,as:"div",defaultVariant:"displayXs",title:J})}),i.jsx("div",{ref:h,className:a.default.fixedHeader,children:i.jsx(A.HighlightedTitle,{className:a.default.title2,as:"div",defaultVariant:"displayXs",title:X})}),i.jsx("div",{ref:m,className:N.cn("scrollableLabels",a.default.scrollableLabels),children:q==null?void 0:q.map((o,s)=>i.jsx(U.Typography,{as:"p",defaultVariant:"labelLg",mobileVariant:"labelSm",className:a.default.scrollLabel,children:o},s))}),i.jsx("div",{ref:p,className:N.cn("description",a.default.description),children:i.jsx(A.HighlightedTitle,{as:"p",defaultVariant:"preambleMd",mobileVariant:"preambleSm",title:K,className:a.default.descriptionText})})]})})})};exports.AllInOne=re;
@@ -1,17 +1,17 @@
1
1
  "use client";
2
- import { jsx as t, jsxs as A } from "react/jsx-runtime";
3
- import { useGSAP as V } from "../../node_modules/@gsap/react/src/index.es.js";
2
+ import { jsx as i, jsxs as j } from "react/jsx-runtime";
3
+ import { useGSAP as U } from "../../node_modules/@gsap/react/src/index.es.js";
4
4
  import { gsap as e } from "../../node_modules/gsap/index.es.js";
5
5
  import { ScrollTrigger as W } from "../../node_modules/gsap/ScrollTrigger.es.js";
6
- import { useState as P, useRef as h, useCallback as z } from "react";
7
- import { HighlightedTitle as S } from "../../components/HighlightedTitle/HighlightedTitle.es.js";
8
- import { Typography as U } from "../../components/Typography/Typography.es.js";
9
- import { cn as N } from "../../utils/cn/cn.es.js";
10
- import G from "../../utils/debounce.es.js";
11
- import { CallToAction as Y } from "../CallToAction/CallToAction.es.js";
12
- import n from "./allInOne.module.css.es.js";
6
+ import { useState as G, useRef as b, useEffect as Y, useCallback as F } from "react";
7
+ import { HighlightedTitle as N } from "../../components/HighlightedTitle/HighlightedTitle.es.js";
8
+ import { Typography as J } from "../../components/Typography/Typography.es.js";
9
+ import { cn as L } from "../../utils/cn/cn.es.js";
10
+ import X from "../../utils/debounce.es.js";
11
+ import { CallToAction as K } from "../CallToAction/CallToAction.es.js";
12
+ import r from "./allInOne.module.css.es.js";
13
13
  e.registerPlugin(W);
14
- const q = [
14
+ const Q = [
15
15
  "health",
16
16
  "energy",
17
17
  "strength",
@@ -23,34 +23,34 @@ const q = [
23
23
  "fun",
24
24
  "years"
25
25
  ], {
26
- title1: D,
27
- title2: F,
28
- description: J,
29
- scrollLabels: $,
30
- images: L,
31
- subtitle: X,
32
- titleTop: M,
33
- scrollableLabels: K,
34
- titleBottom: Q,
35
- descriptionText: Z,
36
- hsaText: ee,
37
- buttonText: te,
38
- buttonLink: ie,
39
- backgroundImage: oe
26
+ title1: Z,
27
+ title2: ee,
28
+ description: te,
29
+ scrollLabels: E,
30
+ images: I,
31
+ subtitle: ie,
32
+ titleTop: oe,
33
+ scrollableLabels: re,
34
+ titleBottom: se,
35
+ descriptionText: ae,
36
+ hsaText: ne,
37
+ buttonText: le,
38
+ buttonLink: ce,
39
+ backgroundImage: pe
40
40
  } = {
41
- subtitle: /* @__PURE__ */ t("p", { children: "YOUR LONGEVITY JOURNEY" }),
42
- titleTop: /* @__PURE__ */ t("p", { children: "Get more" }),
43
- scrollableLabels: q,
44
- titleBottom: /* @__PURE__ */ t("p", { children: "out of life" }),
41
+ subtitle: /* @__PURE__ */ i("p", { children: "YOUR LONGEVITY JOURNEY" }),
42
+ titleTop: /* @__PURE__ */ i("p", { children: "Get more" }),
43
+ scrollableLabels: Q,
44
+ titleBottom: /* @__PURE__ */ i("p", { children: "out of life" }),
45
45
  description: "It's time to shift our thinking from healthcare and lifespan to something deeper. Healthspan.",
46
46
  hsaText: "Healthspan is HSA/FSA Eligible",
47
47
  buttonText: "JOIN NOW",
48
48
  buttonLink: "#",
49
49
  backgroundImage: "https://methodical-vitality-96814f361f.media.strapiapp.com/aio_step_9_67b550bfe1.jpg",
50
- title1: /* @__PURE__ */ t("p", { children: "Unlimited access to" }),
51
- title2: /* @__PURE__ */ A("p", { children: [
50
+ title1: /* @__PURE__ */ i("p", { children: "Unlimited access to" }),
51
+ title2: /* @__PURE__ */ j("p", { children: [
52
52
  "our ",
53
- /* @__PURE__ */ t("b", { children: "team and tools" })
53
+ /* @__PURE__ */ i("b", { children: "team and tools" })
54
54
  ] }),
55
55
  descriptionText: "Healthspan is the only digital clinic that offers all your longevity needs in a single subscription.",
56
56
  scrollLabels: [
@@ -73,181 +73,233 @@ const q = [
73
73
  "https://methodical-vitality-96814f361f.media.strapiapp.com/aio_step_8_ee8608b390.jpg",
74
74
  "https://methodical-vitality-96814f361f.media.strapiapp.com/aio_step_9_67b550bfe1.jpg"
75
75
  ]
76
- }, ge = () => {
77
- const [j, k] = P(!1), _ = 932, f = h(null), a = h(null), p = h(null), d = h(null), m = h(null), l = h(null), w = z(() => {
78
- if (!a.current || !f.current || !p.current || !d.current || !m.current || !l.current)
76
+ }, Re = () => {
77
+ const [k, B] = G(!1), w = 1300, y = b(null), l = b(null), f = b(null), u = b(null), h = b(null), c = b(null), R = b(!1), D = e.matchMedia();
78
+ Y(() => {
79
+ R.current = k;
80
+ }, [k]);
81
+ const H = F(() => {
82
+ if (!l.current || !y.current || !f.current || !u.current || !h.current || !c.current)
79
83
  return;
80
- const r = f.current, i = a.current, s = p.current, c = d.current, g = m.current, b = l.current, x = g.querySelectorAll("p");
81
- if (x.length === 0) return;
82
- x.forEach((u, o) => {
83
- u.style.zIndex = String(x.length - o);
84
+ const s = y.current, o = l.current, p = f.current, a = u.current, d = h.current, T = c.current, C = d.querySelectorAll("p");
85
+ if (C.length === 0) return;
86
+ C.forEach((n, t) => {
87
+ n.style.zIndex = String(C.length - t);
84
88
  });
85
- const v = i.querySelectorAll("img"), R = v.length;
86
- v.forEach((u, o) => {
87
- u.style.zIndex = String(R - o);
89
+ const x = o.querySelectorAll('[data-type="image"]'), A = x.length;
90
+ x.forEach((n, t) => {
91
+ n.style.zIndex = String(A - t);
88
92
  });
89
- const C = r.scrollHeight / R, O = 0.8;
90
- R > 0 && v.forEach((u, o) => {
91
- const H = o * C, E = (o + 1) * C - O * C;
92
- e.fromTo(
93
- [u, x[o]],
93
+ const v = s.scrollHeight / A, O = 0.8;
94
+ A > 0 && x.forEach((n, t) => {
95
+ const _ = t * v, g = (t + 1) * v - O * v;
96
+ console.log(
97
+ `idx: ${t + 1}, fadeStartPosition: ${_}, fadeEndPosition: ${g}`
98
+ ), e.fromTo(
99
+ [n, C[t]],
94
100
  { opacity: 1 },
95
101
  {
96
102
  opacity: 0,
97
103
  scrollTrigger: {
98
- trigger: r,
99
- start: () => `top+=${H} top`,
100
- end: () => `top+=${E} top`,
104
+ trigger: s,
105
+ start: () => `top+=${_} top`,
106
+ end: () => `top+=${g} top`,
101
107
  scrub: !0
102
108
  }
103
109
  }
104
110
  );
105
111
  });
106
- const T = i.getBoundingClientRect(), I = s.getBoundingClientRect(), y = r.getBoundingClientRect();
107
- e.set(g, {
108
- y: `${T.bottom - y.top + 20}px`
109
- }), window.innerWidth > _ ? (e.set(s, {
110
- x: `${T.left - I.width - 50}px`
111
- }), e.set(c, {
112
- x: `${T.right + 25}px`
113
- })) : (e.set(s, {
114
- top: `${y.top - c.clientHeight - 25}px`
115
- }), e.set(c, {
116
- top: `${y.top - 25}px`
117
- }));
118
- const B = window.getComputedStyle(i).borderRadius;
119
- e.to(i, {
112
+ const $ = o.getBoundingClientRect(), P = p.getBoundingClientRect(), q = s.getBoundingClientRect();
113
+ e.set(d, {
114
+ y: `${$.bottom - q.top + 20}px`
115
+ }), D.add(
116
+ {
117
+ isMobile: `(max-width: ${w - 1}px)`,
118
+ isDesktop: `(min-width: ${w}px)`
119
+ },
120
+ (n) => {
121
+ const t = n.conditions, _ = t == null ? void 0 : t.isMobile;
122
+ (t == null ? void 0 : t.isDesktop) && (e.set(p, {
123
+ x: `${$.left - P.width - 50}px`
124
+ }), e.set(a, {
125
+ x: `${$.right + 25}px`
126
+ })), _ && (e.set(p, {
127
+ top: `${$.top - a.clientHeight - 25}px`
128
+ }), e.set(a, {
129
+ top: `${$.top - 25}px`
130
+ }));
131
+ }
132
+ );
133
+ const V = window.getComputedStyle(o).borderRadius;
134
+ e.to(o, {
120
135
  scale: 1,
121
136
  scrollTrigger: {
122
- trigger: r,
137
+ trigger: s,
123
138
  start: "top top",
124
- end: "95% bottom",
139
+ end: "100% bottom",
125
140
  scrub: !0,
126
- onUpdate: (u) => {
127
- if (!a.current || !l.current || !s || !c)
141
+ onUpdate: (n) => {
142
+ if (!l.current || !c.current || !p || !a)
128
143
  return;
129
- const o = i.getBoundingClientRect();
130
- window.innerWidth > _ ? (e.set(s, {
131
- x: `${o.left - I.width - 50}px`
132
- }), e.set(c, {
133
- x: `${o.right + 25}px`
134
- })) : (e.set(s, {
135
- y: `${o.top - y.top - 25}px`
136
- }), e.set(c, {
137
- y: `${o.top - y.top - 25}px`
138
- })), e.set(g, {
139
- y: `${o.bottom + 20}px`
144
+ const t = o.getBoundingClientRect();
145
+ D.add(
146
+ {
147
+ isMobile: `(max-width: ${w - 1}px)`,
148
+ isDesktop: `(min-width: ${w}px)`
149
+ },
150
+ (g) => {
151
+ const m = g.conditions, S = m == null ? void 0 : m.isMobile;
152
+ (m == null ? void 0 : m.isDesktop) && (e.set(p, {
153
+ x: `${t.left - P.width - 50}px`
154
+ }), e.set(a, {
155
+ x: `${t.right + 25}px`
156
+ })), S && (e.set(p, {
157
+ top: `${t.top - a.clientHeight - 25}px`
158
+ }), e.set(a, {
159
+ top: `${t.top - 25}px`
160
+ }));
161
+ }
162
+ ), e.set(d, {
163
+ y: `${t.bottom + 20}px`
140
164
  });
141
- const H = l.current.getBoundingClientRect();
142
- o.bottom + 60 >= H.top ? e.to(b, { opacity: 0, duration: 0.3 }) : e.to(b, { opacity: 1, duration: 0.3 }), u.progress >= 0.99 ? (e.to(i, {
143
- borderRadius: 0,
165
+ const _ = c.current.getBoundingClientRect();
166
+ if (t.bottom + 60 >= _.top ? e.to(T, { opacity: 0, duration: 0.3 }) : e.to(T, { opacity: 1, duration: 0.3 }), n.progress >= 0.9)
167
+ e.to(o, {
168
+ borderRadius: 0,
169
+ duration: 0.3,
170
+ ease: "power1.inOut"
171
+ }), R.current || (R.current = !0, B(!0), e.to([x, d.querySelectorAll("p")], {
172
+ opacity: 0,
173
+ duration: 0.8,
174
+ delay: 0.2,
175
+ ease: "power2.out",
176
+ overwrite: !0
177
+ }));
178
+ else if (e.to(o, {
179
+ borderRadius: V,
144
180
  duration: 0.3,
145
181
  ease: "power1.inOut"
146
- }), e.to(v, {
147
- opacity: 0,
148
- duration: 0.3,
149
- ease: "power1.inOut"
150
- })) : e.to(i, {
151
- borderRadius: B,
152
- duration: 0.3,
153
- ease: "power1.inOut"
154
- });
182
+ }), R.current) {
183
+ R.current = !1, B(!1), e.set(o, { borderRadius: V }), e.killTweensOf([x, d.querySelectorAll("p")]);
184
+ const g = d.querySelectorAll("p");
185
+ x.forEach((m, S) => {
186
+ const M = S * v, z = (S + 1) * v - O * v;
187
+ e.fromTo(
188
+ [m, g[S]],
189
+ { opacity: 1 },
190
+ {
191
+ opacity: 0,
192
+ scrollTrigger: {
193
+ trigger: s,
194
+ start: () => `top+=${M} top`,
195
+ end: () => `top+=${z} top`,
196
+ scrub: !0
197
+ }
198
+ }
199
+ );
200
+ }), W.refresh();
201
+ }
155
202
  }
156
- },
157
- onComplete: () => {
158
- k(!0);
159
203
  }
160
204
  });
161
- }, [a, p, d, m, l]);
162
- return V(
205
+ }, [l, f, u, h, c]);
206
+ return U(
163
207
  () => {
164
- if (!a.current || !f.current || !p.current || !d || !m.current || !l.current)
208
+ if (!l.current || !y.current || !f.current || !u || !h.current || !c.current)
165
209
  return;
166
- const r = a.current, i = p.current, s = d.current, c = m.current, g = l.current;
167
- window.innerWidth <= _ ? e.set(r, {
210
+ const s = l.current, o = f.current, p = u.current, a = h.current, d = c.current;
211
+ window.innerWidth <= w ? e.set(s, {
168
212
  aspectRatio: `${window.innerWidth} / ${window.innerHeight}`,
169
213
  scale: 0.5
170
- }) : e.set(r, {
214
+ }) : e.set(s, {
171
215
  scale: 0.3,
172
216
  aspectRatio: `${window.innerWidth} / ${window.innerHeight}`
173
- }), w();
174
- const b = G(w, 600);
217
+ }), H();
218
+ const T = X(H, 600);
175
219
  return window.addEventListener("resize", () => {
176
- b();
220
+ T();
177
221
  }), () => {
178
- window.removeEventListener("resize", b), e.killTweensOf([r, c, i, s, g]);
222
+ window.removeEventListener("resize", T), e.killTweensOf([s, a, o, p, d]);
179
223
  };
180
224
  },
181
225
  {
182
- scope: f,
226
+ scope: y,
183
227
  dependencies: [
228
+ y,
229
+ l,
184
230
  f,
185
- a,
186
- p,
187
- d,
188
- m,
189
- w
231
+ u,
232
+ h,
233
+ H
190
234
  ]
191
235
  }
192
- ), /* @__PURE__ */ t("div", { className: n.root, children: /* @__PURE__ */ t("div", { ref: f, className: n.container, children: /* @__PURE__ */ A("div", { className: n.pillContainerWrapper, children: [
193
- /* @__PURE__ */ A("div", { ref: a, className: N("pillContainer", n.pillContainer), children: [
194
- L == null ? void 0 : L.map((r, i) => /* @__PURE__ */ t("img", { src: r, alt: `Image ${i + 1}` }, i)),
195
- /* @__PURE__ */ t("div", { className: n.callToActionContainer, children: j && /* @__PURE__ */ t(
196
- Y,
236
+ ), /* @__PURE__ */ i("div", { className: r.root, children: /* @__PURE__ */ i("div", { ref: y, className: r.container, children: /* @__PURE__ */ j("div", { className: r.pillContainerWrapper, children: [
237
+ /* @__PURE__ */ j("div", { ref: l, className: L("pillContainer", r.pillContainer), children: [
238
+ I == null ? void 0 : I.map((s, o) => /* @__PURE__ */ i(
239
+ "div",
240
+ {
241
+ className: r.imageBlock,
242
+ "data-type": "image",
243
+ style: { backgroundImage: `url(${s})` }
244
+ },
245
+ o
246
+ )),
247
+ /* @__PURE__ */ i("div", { className: r.callToActionContainer, children: k && /* @__PURE__ */ i(
248
+ K,
197
249
  {
198
- subtitle: X,
199
- titleTop: M,
200
- scrollableLabels: K,
201
- titleBottom: Q,
202
- description: Z,
203
- hsaText: ee,
204
- buttonText: te,
205
- buttonLink: ie,
206
- backgroundImage: oe
250
+ subtitle: ie,
251
+ titleTop: oe,
252
+ scrollableLabels: re,
253
+ titleBottom: se,
254
+ description: ae,
255
+ hsaText: ne,
256
+ buttonText: le,
257
+ buttonLink: ce,
258
+ backgroundImage: pe
207
259
  }
208
260
  ) })
209
261
  ] }),
210
- /* @__PURE__ */ t("div", { ref: p, className: n.fixedHeader, children: /* @__PURE__ */ t(
211
- S,
262
+ /* @__PURE__ */ i("div", { ref: f, className: r.fixedHeader, children: /* @__PURE__ */ i(
263
+ N,
212
264
  {
213
- className: n.title1,
265
+ className: r.title1,
214
266
  as: "div",
215
267
  defaultVariant: "displayXs",
216
- title: D
268
+ title: Z
217
269
  }
218
270
  ) }),
219
- /* @__PURE__ */ t("div", { ref: d, className: n.fixedHeader, children: /* @__PURE__ */ t(
220
- S,
271
+ /* @__PURE__ */ i("div", { ref: u, className: r.fixedHeader, children: /* @__PURE__ */ i(
272
+ N,
221
273
  {
222
- className: n.title2,
274
+ className: r.title2,
223
275
  as: "div",
224
276
  defaultVariant: "displayXs",
225
- title: F
277
+ title: ee
226
278
  }
227
279
  ) }),
228
- /* @__PURE__ */ t("div", { ref: m, className: N("scrollableLabels", n.scrollableLabels), children: $ == null ? void 0 : $.map((r, i) => /* @__PURE__ */ t(
229
- U,
280
+ /* @__PURE__ */ i("div", { ref: h, className: L("scrollableLabels", r.scrollableLabels), children: E == null ? void 0 : E.map((s, o) => /* @__PURE__ */ i(
281
+ J,
230
282
  {
231
283
  as: "p",
232
284
  defaultVariant: "labelLg",
233
285
  mobileVariant: "labelSm",
234
- className: n.scrollLabel,
235
- children: r
286
+ className: r.scrollLabel,
287
+ children: s
236
288
  },
237
- i
289
+ o
238
290
  )) }),
239
- /* @__PURE__ */ t("div", { ref: l, className: N("description", n.description), children: /* @__PURE__ */ t(
240
- S,
291
+ /* @__PURE__ */ i("div", { ref: c, className: L("description", r.description), children: /* @__PURE__ */ i(
292
+ N,
241
293
  {
242
294
  as: "p",
243
295
  defaultVariant: "preambleMd",
244
296
  mobileVariant: "preambleSm",
245
- title: J,
246
- className: n.descriptionText
297
+ title: te,
298
+ className: r.descriptionText
247
299
  }
248
300
  ) })
249
301
  ] }) }) });
250
302
  };
251
303
  export {
252
- ge as AllInOne
304
+ Re as AllInOne
253
305
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e="allInOne-module__root___aRPBl",l="allInOne-module__container___FKeTW",n="allInOne-module__pillContainerWrapper___kXrF1",o="allInOne-module__pillContainer___PJAUY",t="allInOne-module__callToActionContainer___J0Gfh",i="allInOne-module__fixedHeader___4Lq8d",a="allInOne-module__scrollableLabels___BtN-2",r="allInOne-module__description___Y3gZh",_="allInOne-module__descriptionText___svjVl",c={root:e,container:l,pillContainerWrapper:n,pillContainer:o,callToActionContainer:t,fixedHeader:i,scrollableLabels:a,description:r,descriptionText:_};exports.callToActionContainer=t;exports.container=l;exports.default=c;exports.description=r;exports.descriptionText=_;exports.fixedHeader=i;exports.pillContainer=o;exports.pillContainerWrapper=n;exports.root=e;exports.scrollableLabels=a;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e="allInOne-module__root___aRPBl",l="allInOne-module__container___FKeTW",n="allInOne-module__pillContainerWrapper___kXrF1",o="allInOne-module__pillContainer___PJAUY",t="allInOne-module__callToActionContainer___J0Gfh",a="allInOne-module__imageBlock___0a5Ir",i="allInOne-module__fixedHeader___4Lq8d",_="allInOne-module__scrollableLabels___BtN-2",r="allInOne-module__description___Y3gZh",c="allInOne-module__descriptionText___svjVl",s={root:e,container:l,pillContainerWrapper:n,pillContainer:o,callToActionContainer:t,imageBlock:a,fixedHeader:i,scrollableLabels:_,description:r,descriptionText:c};exports.callToActionContainer=t;exports.container=l;exports.default=s;exports.description=r;exports.descriptionText=c;exports.fixedHeader=i;exports.imageBlock=a;exports.pillContainer=o;exports.pillContainerWrapper=n;exports.root=e;exports.scrollableLabels=_;
@@ -1,23 +1,25 @@
1
- const e = "allInOne-module__root___aRPBl", l = "allInOne-module__container___FKeTW", n = "allInOne-module__pillContainerWrapper___kXrF1", o = "allInOne-module__pillContainer___PJAUY", _ = "allInOne-module__callToActionContainer___J0Gfh", t = "allInOne-module__fixedHeader___4Lq8d", a = "allInOne-module__scrollableLabels___BtN-2", i = "allInOne-module__description___Y3gZh", r = "allInOne-module__descriptionText___svjVl", c = {
2
- root: e,
3
- container: l,
1
+ const l = "allInOne-module__root___aRPBl", e = "allInOne-module__container___FKeTW", n = "allInOne-module__pillContainerWrapper___kXrF1", o = "allInOne-module__pillContainer___PJAUY", _ = "allInOne-module__callToActionContainer___J0Gfh", a = "allInOne-module__imageBlock___0a5Ir", t = "allInOne-module__fixedHeader___4Lq8d", i = "allInOne-module__scrollableLabels___BtN-2", r = "allInOne-module__description___Y3gZh", c = "allInOne-module__descriptionText___svjVl", s = {
2
+ root: l,
3
+ container: e,
4
4
  pillContainerWrapper: n,
5
5
  pillContainer: o,
6
6
  callToActionContainer: _,
7
+ imageBlock: a,
7
8
  fixedHeader: t,
8
- scrollableLabels: a,
9
- description: i,
10
- descriptionText: r
9
+ scrollableLabels: i,
10
+ description: r,
11
+ descriptionText: c
11
12
  };
12
13
  export {
13
14
  _ as callToActionContainer,
14
- l as container,
15
- c as default,
16
- i as description,
17
- r as descriptionText,
15
+ e as container,
16
+ s as default,
17
+ r as description,
18
+ c as descriptionText,
18
19
  t as fixedHeader,
20
+ a as imageBlock,
19
21
  o as pillContainer,
20
22
  n as pillContainerWrapper,
21
- e as root,
22
- a as scrollableLabels
23
+ l as root,
24
+ i as scrollableLabels
23
25
  };
@@ -1 +1 @@
1
- "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),l=require("react"),X=require("../../components/Button/Button.cjs.js"),d=require("../../components/Typography/Typography.cjs.js"),w=require("../../components/Icon/Icon.cjs.js"),M=require("../../components/Icon/constants.cjs.js"),x=require("../../components/HighlightedTitle/HighlightedTitle.cjs.js"),a=require("../../node_modules/gsap/index.cjs.js"),z=require("../../node_modules/@gsap/react/src/index.cjs.js"),F=require("../../node_modules/gsap/ScrollTrigger.cjs.js"),D=require("../../utils/debounce.cjs.js"),t=require("./callToAction.module.css.cjs.js");a.gsap.registerPlugin(F.ScrollTrigger);const G=({subtitle:A,titleTop:E,scrollableLabels:j,titleBottom:P,description:C,hsaText:W,buttonText:k,buttonLink:f,backgroundImage:B})=>{const R=l.useRef(null),i=l.useRef(null),T=l.useRef(null),p=l.useRef(null),h=l.useRef(null),N=l.useRef(null),m=l.useRef(null),g=l.useRef(null),y=l.useRef(null);return z.useGSAP(()=>{var V,L,H;const o=(V=T.current)==null?void 0:V.querySelector("p"),u=(L=N.current)==null?void 0:L.querySelector("p"),$=[o,p.current,i.current,h.current,u,m.current,g.current,y.current].filter(Boolean);a.gsap.set($,{clipPath:"inset(0% 0% 100% 0%)",yPercent:100}),a.gsap.to([o,p.current,i.current,h.current,u,m.current,g.current,y.current],{clipPath:"inset(0% 0% 0% 0%)",yPercent:0,duration:1,ease:"power2.out",delay:1,stagger:{amount:1,from:"start"},scrollTrigger:{trigger:R.current,start:"top center",end:"+=500"}});const r=(H=i.current)==null?void 0:H.querySelector("ul");if(!r)return;const v=r.innerHTML;let s=null,q=!0;const _=()=>{s&&s.kill(),r.innerHTML=v,a.gsap.set(r,{y:0});const n=Array.from(r.querySelectorAll("li"));if(n.length<=1)return;const b=n[0].clientHeight;if(!b)return;a.gsap.set(i.current,{height:b,overflow:"hidden"});const I=Array.from(n);I.forEach(S=>{r.appendChild(S.cloneNode(!0))}),s=a.gsap.timeline({repeat:-1,delay:q?2.5:0,onRepeat:()=>{a.gsap.set(r,{y:0})}}),I.forEach((S,O)=>{s&&s.to({},{duration:2}).to(r,{y:`-${(O+1)*b}`,duration:.5,ease:"power1.inOut"})}),q=!1},c=D.default(_,200);return _(),window.addEventListener("resize",c),()=>{var n;window.removeEventListener("resize",c),(n=c.kill)==null||n.call(c),s&&s.kill(),r&&(r.innerHTML=v,a.gsap.set(r,{y:0}))}},[j]),e.jsxs("section",{ref:R,className:t.default.root,children:[e.jsx("div",{className:t.default.backgroundImage,style:{backgroundImage:`url(${B})`}}),e.jsxs("div",{className:t.default.container,children:[e.jsx("div",{className:t.default.leftContent,children:e.jsxs("div",{className:t.default.content,children:[e.jsx("div",{ref:p,children:e.jsx(x.HighlightedTitle,{defaultVariant:"displayXl",mobileVariant:"displayMd",as:"div",className:t.default.title,title:E})}),e.jsx("div",{ref:i,className:t.default.scrollableLabelsWrapper,children:e.jsx("ul",{className:t.default.scrollableLabels,children:j.map((o,u)=>e.jsx("li",{className:t.default.scrollableLabel,children:e.jsx(d.Typography,{defaultVariant:"displayXl",mobileVariant:"displayMd",as:"span",children:o})},u))})}),e.jsx("div",{ref:h,children:e.jsx(x.HighlightedTitle,{defaultVariant:"displayXl",mobileVariant:"displayMd",as:"div",className:t.default.title,title:P})})]})}),e.jsx("div",{ref:T,className:t.default.subtitleWrapper,children:e.jsx(x.HighlightedTitle,{defaultVariant:"labelMd",mobileVariant:"labelSm",as:"div",className:t.default.subtitle,title:A})}),e.jsx("div",{ref:N,className:t.default.arrowWrapper,children:e.jsxs(d.Typography,{defaultVariant:"labelXl",mobileVariant:"labelLg",className:t.default.arrow,as:"p",children:["(",e.jsx(w.Icon,{name:M.EIconName.ARROW_FORWARD}),")"]})}),e.jsx("div",{className:t.default.rightContent,children:e.jsxs("div",{className:t.default.descriptionWrapper,children:[e.jsx("div",{ref:m,children:e.jsx(d.Typography,{defaultVariant:"bodyLg",mobileVariant:"bodyMd",className:t.default.description,children:C})}),e.jsx("div",{ref:g,className:t.default.buttonWrapper,children:f&&e.jsx(X.Button,{as:f?"a":"button",href:f,variant:"secondary",size:"lg",children:k})}),e.jsxs("div",{ref:y,className:t.default.hsaEligible,children:[e.jsx(w.Icon,{name:M.EIconName.CIRCLE_CHECK_FILL,className:t.default.checkIcon}),e.jsx(d.Typography,{defaultVariant:"bodySm",mobileVariant:"bodySm",className:t.default.hsaText,children:W})]})]})})]})]})};exports.CallToAction=G;
1
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),l=require("react"),X=require("../../components/Button/Button.cjs.js"),d=require("../../components/Typography/Typography.cjs.js"),w=require("../../components/Icon/Icon.cjs.js"),M=require("../../components/Icon/constants.cjs.js"),x=require("../../components/HighlightedTitle/HighlightedTitle.cjs.js"),a=require("../../node_modules/gsap/index.cjs.js"),z=require("../../node_modules/@gsap/react/src/index.cjs.js"),F=require("../../node_modules/gsap/ScrollTrigger.cjs.js"),D=require("../../utils/debounce.cjs.js"),t=require("./callToAction.module.css.cjs.js");a.gsap.registerPlugin(F.ScrollTrigger);const G=({subtitle:A,titleTop:E,scrollableLabels:j,titleBottom:P,description:C,hsaText:W,buttonText:k,buttonLink:f,backgroundImage:B})=>{const R=l.useRef(null),i=l.useRef(null),T=l.useRef(null),p=l.useRef(null),h=l.useRef(null),N=l.useRef(null),m=l.useRef(null),g=l.useRef(null),y=l.useRef(null);return z.useGSAP(()=>{var V,L,H;const o=(V=T.current)==null?void 0:V.querySelector("p"),u=(L=N.current)==null?void 0:L.querySelector("p"),$=[o,p.current,i.current,h.current,u,m.current,g.current,y.current].filter(Boolean);a.gsap.set($,{clipPath:"inset(0% 0% 100% 0%)",yPercent:100}),a.gsap.to([o,p.current,i.current,h.current,u,m.current,g.current,y.current],{clipPath:"inset(0% 0% 0% 0%)",yPercent:0,duration:1,ease:"power2.out",delay:1,stagger:{amount:1,from:"start"},scrollTrigger:{trigger:R.current,start:"top 80%",end:"+=500"}});const r=(H=i.current)==null?void 0:H.querySelector("ul");if(!r)return;const v=r.innerHTML;let s=null,q=!0;const _=()=>{s&&s.kill(),r.innerHTML=v,a.gsap.set(r,{y:0});const n=Array.from(r.querySelectorAll("li"));if(n.length<=1)return;const b=n[0].clientHeight;if(!b)return;a.gsap.set(i.current,{height:b,overflow:"hidden"});const I=Array.from(n);I.forEach(S=>{r.appendChild(S.cloneNode(!0))}),s=a.gsap.timeline({repeat:-1,delay:q?2.5:0,onRepeat:()=>{a.gsap.set(r,{y:0})}}),I.forEach((S,O)=>{s&&s.to({},{duration:2}).to(r,{y:`-${(O+1)*b}`,duration:.5,ease:"power1.inOut"})}),q=!1},c=D.default(_,200);return _(),window.addEventListener("resize",c),()=>{var n;window.removeEventListener("resize",c),(n=c.kill)==null||n.call(c),s&&s.kill(),r&&(r.innerHTML=v,a.gsap.set(r,{y:0}))}},[j]),e.jsxs("section",{ref:R,className:t.default.root,children:[e.jsx("div",{className:t.default.backgroundImage,style:{backgroundImage:`url(${B})`}}),e.jsxs("div",{className:t.default.container,children:[e.jsx("div",{className:t.default.leftContent,children:e.jsxs("div",{className:t.default.content,children:[e.jsx("div",{ref:p,children:e.jsx(x.HighlightedTitle,{defaultVariant:"displayXl",mobileVariant:"displayMd",as:"div",className:t.default.title,title:E})}),e.jsx("div",{ref:i,className:t.default.scrollableLabelsWrapper,children:e.jsx("ul",{className:t.default.scrollableLabels,children:j.map((o,u)=>e.jsx("li",{className:t.default.scrollableLabel,children:e.jsx(d.Typography,{defaultVariant:"displayXl",mobileVariant:"displayMd",as:"span",children:o})},u))})}),e.jsx("div",{ref:h,children:e.jsx(x.HighlightedTitle,{defaultVariant:"displayXl",mobileVariant:"displayMd",as:"div",className:t.default.title,title:P})})]})}),e.jsx("div",{ref:T,className:t.default.subtitleWrapper,children:e.jsx(x.HighlightedTitle,{defaultVariant:"labelMd",mobileVariant:"labelSm",as:"div",className:t.default.subtitle,title:A})}),e.jsx("div",{ref:N,className:t.default.arrowWrapper,children:e.jsxs(d.Typography,{defaultVariant:"labelXl",mobileVariant:"labelLg",className:t.default.arrow,as:"p",children:["(",e.jsx(w.Icon,{name:M.EIconName.ARROW_FORWARD}),")"]})}),e.jsx("div",{className:t.default.rightContent,children:e.jsxs("div",{className:t.default.descriptionWrapper,children:[e.jsx("div",{ref:m,children:e.jsx(d.Typography,{as:"p",defaultVariant:"bodyLg",mobileVariant:"bodyMd",className:t.default.description,children:C})}),e.jsx("div",{ref:g,className:t.default.buttonWrapper,children:f&&e.jsx(X.Button,{as:f?"a":"button",href:f,variant:"secondary",size:"lg",children:k})}),e.jsxs("div",{ref:y,className:t.default.hsaEligible,children:[e.jsx(w.Icon,{name:M.EIconName.CIRCLE_CHECK_FILL,className:t.default.checkIcon}),e.jsx(d.Typography,{as:"p",defaultVariant:"bodySm",mobileVariant:"bodySm",className:t.default.hsaText,children:W})]})]})})]})]})};exports.CallToAction=G;
@@ -62,7 +62,7 @@ const ne = ({
62
62
  },
63
63
  scrollTrigger: {
64
64
  trigger: V.current,
65
- start: "top center",
65
+ start: "top 80%",
66
66
  end: "+=500"
67
67
  }
68
68
  }
@@ -141,7 +141,16 @@ const ne = ({
141
141
  ")"
142
142
  ] }) }),
143
143
  /* @__PURE__ */ e("div", { className: r.rightContent, children: /* @__PURE__ */ s("div", { className: r.descriptionWrapper, children: [
144
- /* @__PURE__ */ e("div", { ref: b, children: /* @__PURE__ */ e(u, { defaultVariant: "bodyLg", mobileVariant: "bodyMd", className: r.description, children: X }) }),
144
+ /* @__PURE__ */ e("div", { ref: b, children: /* @__PURE__ */ e(
145
+ u,
146
+ {
147
+ as: "p",
148
+ defaultVariant: "bodyLg",
149
+ mobileVariant: "bodyMd",
150
+ className: r.description,
151
+ children: X
152
+ }
153
+ ) }),
145
154
  /* @__PURE__ */ e("div", { ref: g, className: r.buttonWrapper, children: f && /* @__PURE__ */ e(
146
155
  j,
147
156
  {
@@ -154,7 +163,16 @@ const ne = ({
154
163
  ) }),
155
164
  /* @__PURE__ */ s("div", { ref: y, className: r.hsaEligible, children: [
156
165
  /* @__PURE__ */ e(A, { name: I.CIRCLE_CHECK_FILL, className: r.checkIcon }),
157
- /* @__PURE__ */ e(u, { defaultVariant: "bodySm", mobileVariant: "bodySm", className: r.hsaText, children: _ })
166
+ /* @__PURE__ */ e(
167
+ u,
168
+ {
169
+ as: "p",
170
+ defaultVariant: "bodySm",
171
+ mobileVariant: "bodySm",
172
+ className: r.hsaText,
173
+ children: _
174
+ }
175
+ )
158
176
  ] })
159
177
  ] }) })
160
178
  ] })
@@ -0,0 +1 @@
1
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),t=require("./components/MailchimpModal/MailchimpModal.cjs.js"),r=require("./useHSModal.cjs.js"),d=require("./hsModal.module.css.cjs.js"),u=l=>{const{isOpen:a,closeModal:i,handleClick:n,handleOverlayClick:c}=r.useHSModal({id:l.id,initiallyOpen:l.initiallyOpen,trigger:l.trigger,onCloseCallback:l.onCloseCallback,onClickCallback:l.onClickCallback}),o=()=>{switch(l.type){case"mailchimp":return e.jsx(t.MailchimpModal,{...l,onCloseCallback:i,onClickCallback:n});default:return null}};return a?e.jsx("div",{className:d.default.overlay,onClick:c,children:o()}):null};exports.HSModal=u;
@@ -0,0 +1,4 @@
1
+ import { TMailchimpModal } from './types';
2
+
3
+ export type HSModalProps = TMailchimpModal;
4
+ export declare const HSModal: (props: HSModalProps) => import("react/jsx-runtime").JSX.Element | null;
@@ -0,0 +1,25 @@
1
+ "use client";
2
+ import { jsx as e } from "react/jsx-runtime";
3
+ import { MailchimpModal as t } from "./components/MailchimpModal/MailchimpModal.es.js";
4
+ import { useHSModal as r } from "./useHSModal.es.js";
5
+ import C from "./hsModal.module.css.es.js";
6
+ const u = (l) => {
7
+ const { isOpen: i, closeModal: a, handleClick: n, handleOverlayClick: o } = r({
8
+ id: l.id,
9
+ initiallyOpen: l.initiallyOpen,
10
+ trigger: l.trigger,
11
+ onCloseCallback: l.onCloseCallback,
12
+ onClickCallback: l.onClickCallback
13
+ }), c = () => {
14
+ switch (l.type) {
15
+ case "mailchimp":
16
+ return /* @__PURE__ */ e(t, { ...l, onCloseCallback: a, onClickCallback: n });
17
+ default:
18
+ return null;
19
+ }
20
+ };
21
+ return i ? /* @__PURE__ */ e("div", { className: C.overlay, onClick: o, children: c() }) : null;
22
+ };
23
+ export {
24
+ u as HSModal
25
+ };