quirk-ui 0.0.538 → 0.0.540

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.
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../../assets/index13.css');const s=require("react/jsx-runtime"),l=require("../../ui/PortableTextRenderer/index.cjs"),V=require("../../ui/CallToActions/index.cjs"),W=require("next/image"),y=require("../../hooks/useStyleClasses.cjs"),N="_content_ivubr_1",H="_container_ivubr_7",$="_metrics_ivubr_34",B="_metric_ivubr_34",C="_metricValue_ivubr_50",k="_disclaimer_ivubr_71",w="_layoutHImageRight_ivubr_76",R="_heading_ivubr_80",z="_image_ivubr_85",g="_noImage_ivubr_95",T="_layoutHImageLeft_ivubr_99",q="_layoutVImageTop_ivubr_118",L="_layoutVImageBottom_ivubr_131",S="_title_ivubr_151",D="_text_ivubr_156",U="_cta_ivubr_170",P="_headingHorizontal_ivubr_178",F="_titleWrapper_ivubr_187",M="_headingVertical_ivubr_208",Y="_videoWrapper_ivubr_229",E="_maxWidth_ivubr_257",G="_fullBleed_ivubr_267",e={content:N,container:H,metrics:$,metric:B,metricValue:C,disclaimer:k,layoutHImageRight:w,heading:R,image:z,noImage:g,layoutHImageLeft:T,layoutVImageTop:q,layoutVImageBottom:L,title:S,text:D,cta:U,headingHorizontal:P,titleWrapper:F,headingVertical:M,videoWrapper:Y,default:"_default_ivubr_249",maxWidth:E,fullBleed:G};function J({layout:r,heading:i,image:t,video:o,metrics:u,callToAction:c,disclaimer:_,styleOptions:a}){var m;const h=y.useStyleClasses(a),d={"--container-max-width":(a==null?void 0:a.maxWidth)??"unset","--gap":r==null?void 0:r.gap},v={"--max-width":(t==null?void 0:t.display)==="max-width"?t==null?void 0:t.maxWidth:"unset"},b={"no-image":e.noImage,"horizontal-image-right":e.layoutHImageRight,"horizontal-image-left":e.layoutHImageLeft,"vertical-image-top":e.layoutVImageTop,"vertical-image-bottom":e.layoutVImageBottom}[(r==null?void 0:r.orientation)??"horizontal-image-right"],p={horizontal:e.headingHorizontal,vertical:e.headingVertical}[i.headingLayout??"horizontal"],f={default:e.default,"max-width":e.maxWidth,"full-bleed":e.fullBleed}[(t==null?void 0:t.display)??"default"],j=()=>{var x;if(!o)return null;const n=o.includes("vimeo.com"),I=o.includes("youtube.com")||o.includes("youtu.be");return n||I?s.jsx("div",{style:{maxWidth:(t==null?void 0:t.maxWidth)??"unset",flex:.65},children:s.jsx("div",{className:e.videoWrapper,children:s.jsx("iframe",{src:n?`${o}?autoplay=0&muted=0&loop=0`:`${o}?autoplay=0&mute=0&loop=0}`,allow:"autoplay; fullscreen",allowFullScreen:!0})})}):s.jsx("div",{style:{maxWidth:(t==null?void 0:t.maxWidth)??"unset",width:"100%",flex:.65},children:s.jsx("div",{className:e.videoWrapper,children:s.jsx("video",{src:o,controls:!0,poster:((x=t==null?void 0:t.imageUrls)==null?void 0:x.medium)||void 0})})})};return s.jsx("section",{className:`${h} ${e.content}`,children:s.jsxs("article",{className:`${e.container} ${b}`,style:d||{},children:[s.jsxs("div",{className:`${e.heading} ${p}`,children:[s.jsxs("div",{className:e.titleWrapper,children:[i.eyebrow&&s.jsx(l.RichText,{blocks:i.eyebrow}),i.title&&s.jsx(l.RichText,{className:e.title,blocks:i.title})]}),((i==null?void 0:i.description)||(c==null?void 0:c.items))&&s.jsxs("div",{className:e.text,children:[i.description&&s.jsx(l.RichText,{blocks:i.description}),u&&s.jsx("div",{className:e.metrics,children:u.map(n=>s.jsxs("div",{className:e.metric,children:[s.jsx("div",{className:e.metricValue,children:n.metricValue}),n.metricDescription&&s.jsx(l.RichText,{blocks:n.metricDescription})]},n._key))}),c&&s.jsx(V.CallToActions,{className:e.cta,items:c.items,alignment:c.alignment}),_&&s.jsx(l.RichText,{className:e.disclaimer,blocks:_})]})]}),(r==null?void 0:r.orientation)!=="no-image"&&o?j():(r==null?void 0:r.orientation)!=="no-image"&&t&&t.imageUrls&&s.jsx("div",{className:`${e.image} ${f}`,style:v,children:s.jsx(W,{src:(m=t==null?void 0:t.imageUrls)==null?void 0:m.medium,alt:(t==null?void 0:t.asset.altText)||(t==null?void 0:t.asset.description)||"Content image",width:600,height:400,priority:!0})})]})})}exports.ContentBlock=J;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../../assets/index13.css');const s=require("react/jsx-runtime"),n=require("../../ui/PortableTextRenderer/index.cjs"),C=require("../../ui/CallToActions/index.cjs"),H=require("next/image"),$=require("../../hooks/useStyleClasses.cjs"),B=require("../../contexts/ThemeContext.cjs"),T="_content_ivubr_1",w="_container_ivubr_7",R="_metrics_ivubr_34",z="_metric_ivubr_34",q="_metricValue_ivubr_50",L="_disclaimer_ivubr_71",S="_layoutHImageRight_ivubr_76",U="_heading_ivubr_80",D="_image_ivubr_85",P="_noImage_ivubr_95",F="_layoutHImageLeft_ivubr_99",M="_layoutVImageTop_ivubr_118",Y="_layoutVImageBottom_ivubr_131",E="_title_ivubr_151",G="_text_ivubr_156",J="_cta_ivubr_170",K="_headingHorizontal_ivubr_178",Q="_titleWrapper_ivubr_187",X="_headingVertical_ivubr_208",Z="_videoWrapper_ivubr_229",A="_maxWidth_ivubr_257",O="_fullBleed_ivubr_267",t={content:T,container:w,metrics:R,metric:z,metricValue:q,disclaimer:L,layoutHImageRight:S,heading:U,image:D,noImage:P,layoutHImageLeft:F,layoutVImageTop:M,layoutVImageBottom:Y,title:E,text:G,cta:J,headingHorizontal:K,titleWrapper:Q,headingVertical:X,videoWrapper:Z,default:"_default_ivubr_249",maxWidth:A,fullBleed:O};function ee({layout:r,heading:i,image:e,video:a,metrics:_,callToAction:l,disclaimer:m,styleOptions:c}){var h,v,b,p,f;const{mode:d}=B.useTheme(),I=$.useStyleClasses(c),x={"--container-max-width":(c==null?void 0:c.maxWidth)??"unset","--gap":r==null?void 0:r.gap},j={"--max-width":(e==null?void 0:e.display)==="max-width"?e==null?void 0:e.maxWidth:"unset"},V={"no-image":t.noImage,"horizontal-image-right":t.layoutHImageRight,"horizontal-image-left":t.layoutHImageLeft,"vertical-image-top":t.layoutVImageTop,"vertical-image-bottom":t.layoutVImageBottom}[(r==null?void 0:r.orientation)??"horizontal-image-right"],W={horizontal:t.headingHorizontal,vertical:t.headingVertical}[i.headingLayout??"horizontal"],g={default:t.default,"max-width":t.maxWidth,"full-bleed":t.fullBleed}[(e==null?void 0:e.display)??"default"];let u;e!=null&&e.imageUrls&&(u=d==="dark"&&((h=e.imageUrls.dark)==null?void 0:h.medium)||e.imageUrls.default.medium);let k=((b=(v=e==null?void 0:e[d==="dark"?"darkImage":"defaultImage"])==null?void 0:v.asset)==null?void 0:b.altText)||((f=(p=e==null?void 0:e[d==="dark"?"darkImage":"defaultImage"])==null?void 0:p.asset)==null?void 0:f.description)||"Card image";const y=()=>{if(!a)return null;const o=a.includes("vimeo.com"),N=a.includes("youtube.com")||a.includes("youtu.be");return o||N?s.jsx("div",{style:{maxWidth:(e==null?void 0:e.maxWidth)??"unset",flex:.65},children:s.jsx("div",{className:t.videoWrapper,children:s.jsx("iframe",{src:o?`${a}?autoplay=0&muted=0&loop=0`:`${a}?autoplay=0&mute=0&loop=0}`,allow:"autoplay; fullscreen",allowFullScreen:!0})})}):s.jsx("div",{style:{maxWidth:(e==null?void 0:e.maxWidth)??"unset",width:"100%",flex:.65},children:s.jsx("div",{className:t.videoWrapper,children:s.jsx("video",{src:a,controls:!0,poster:u||void 0})})})};return s.jsx("section",{className:`${I} ${t.content}`,children:s.jsxs("article",{className:`${t.container} ${V}`,style:x||{},children:[s.jsxs("div",{className:`${t.heading} ${W}`,children:[s.jsxs("div",{className:t.titleWrapper,children:[i.eyebrow&&s.jsx(n.RichText,{blocks:i.eyebrow}),i.title&&s.jsx(n.RichText,{className:t.title,blocks:i.title})]}),((i==null?void 0:i.description)||(l==null?void 0:l.items))&&s.jsxs("div",{className:t.text,children:[i.description&&s.jsx(n.RichText,{blocks:i.description}),_&&s.jsx("div",{className:t.metrics,children:_.map(o=>s.jsxs("div",{className:t.metric,children:[s.jsx("div",{className:t.metricValue,children:o.metricValue}),o.metricDescription&&s.jsx(n.RichText,{blocks:o.metricDescription})]},o._key))}),l&&s.jsx(C.CallToActions,{className:t.cta,items:l.items,alignment:l.alignment}),m&&s.jsx(n.RichText,{className:t.disclaimer,blocks:m})]})]}),(r==null?void 0:r.orientation)!=="no-image"&&a?y():(r==null?void 0:r.orientation)!=="no-image"&&e&&u&&s.jsx("div",{className:`${t.image} ${g}`,style:j,children:s.jsx(H,{src:u,alt:k,width:600,height:400,priority:!0})})]})})}exports.ContentBlock=ee;
@@ -1,70 +1,74 @@
1
- import { jsx as r, jsxs as a } from "react/jsx-runtime";
2
- import { RichText as c } from "../../ui/PortableTextRenderer/index.mjs";
3
- import { CallToActions as N } from "../../ui/CallToActions/index.mjs";
4
- import y from "next/image";
5
- import { useStyleClasses as H } from "../../hooks/useStyleClasses.mjs";
6
- import '../../../assets/index13.css';const w = "_content_ivubr_1", B = "_container_ivubr_7", $ = "_metrics_ivubr_34", z = "_metric_ivubr_34", k = "_metricValue_ivubr_50", C = "_disclaimer_ivubr_71", g = "_layoutHImageRight_ivubr_76", L = "_heading_ivubr_80", R = "_image_ivubr_85", D = "_noImage_ivubr_95", U = "_layoutHImageLeft_ivubr_99", j = "_layoutVImageTop_ivubr_118", S = "_layoutVImageBottom_ivubr_131", F = "_title_ivubr_151", T = "_text_ivubr_156", Y = "_cta_ivubr_170", q = "_headingHorizontal_ivubr_178", E = "_titleWrapper_ivubr_187", G = "_headingVertical_ivubr_208", J = "_videoWrapper_ivubr_229", K = "_maxWidth_ivubr_257", M = "_fullBleed_ivubr_267", e = {
7
- content: w,
8
- container: B,
9
- metrics: $,
10
- metric: z,
11
- metricValue: k,
12
- disclaimer: C,
13
- layoutHImageRight: g,
14
- heading: L,
15
- image: R,
16
- noImage: D,
17
- layoutHImageLeft: U,
18
- layoutVImageTop: j,
19
- layoutVImageBottom: S,
20
- title: F,
21
- text: T,
22
- cta: Y,
23
- headingHorizontal: q,
24
- titleWrapper: E,
25
- headingVertical: G,
26
- videoWrapper: J,
1
+ import { jsx as r, jsxs as c } from "react/jsx-runtime";
2
+ import { RichText as n } from "../../ui/PortableTextRenderer/index.mjs";
3
+ import { CallToActions as B } from "../../ui/CallToActions/index.mjs";
4
+ import $ from "next/image";
5
+ import { useStyleClasses as z } from "../../hooks/useStyleClasses.mjs";
6
+ import { useTheme as C } from "../../contexts/ThemeContext.mjs";
7
+ import '../../../assets/index13.css';const L = "_content_ivubr_1", R = "_container_ivubr_7", U = "_metrics_ivubr_34", D = "_metric_ivubr_34", T = "_metricValue_ivubr_50", j = "_disclaimer_ivubr_71", S = "_layoutHImageRight_ivubr_76", F = "_heading_ivubr_80", Y = "_image_ivubr_85", q = "_noImage_ivubr_95", E = "_layoutHImageLeft_ivubr_99", G = "_layoutVImageTop_ivubr_118", J = "_layoutVImageBottom_ivubr_131", K = "_title_ivubr_151", M = "_text_ivubr_156", P = "_cta_ivubr_170", Q = "_headingHorizontal_ivubr_178", X = "_titleWrapper_ivubr_187", Z = "_headingVertical_ivubr_208", A = "_videoWrapper_ivubr_229", O = "_maxWidth_ivubr_257", tt = "_fullBleed_ivubr_267", e = {
8
+ content: L,
9
+ container: R,
10
+ metrics: U,
11
+ metric: D,
12
+ metricValue: T,
13
+ disclaimer: j,
14
+ layoutHImageRight: S,
15
+ heading: F,
16
+ image: Y,
17
+ noImage: q,
18
+ layoutHImageLeft: E,
19
+ layoutVImageTop: G,
20
+ layoutVImageBottom: J,
21
+ title: K,
22
+ text: M,
23
+ cta: P,
24
+ headingHorizontal: Q,
25
+ titleWrapper: X,
26
+ headingVertical: Z,
27
+ videoWrapper: A,
27
28
  default: "_default_ivubr_249",
28
- maxWidth: K,
29
- fullBleed: M
29
+ maxWidth: O,
30
+ fullBleed: tt
30
31
  };
31
- function A({
32
+ function lt({
32
33
  layout: i,
33
- heading: o,
34
+ heading: a,
34
35
  image: t,
35
- video: s,
36
+ video: o,
36
37
  metrics: _,
37
- callToAction: n,
38
- disclaimer: d,
39
- styleOptions: u
38
+ callToAction: l,
39
+ disclaimer: h,
40
+ styleOptions: m
40
41
  }) {
41
- var h;
42
- const v = H(u), m = {
43
- "--container-max-width": (u == null ? void 0 : u.maxWidth) ?? "unset",
42
+ var v, b, f, x, I;
43
+ const { mode: u } = C(), V = z(m), p = {
44
+ "--container-max-width": (m == null ? void 0 : m.maxWidth) ?? "unset",
44
45
  "--gap": i == null ? void 0 : i.gap
45
- }, b = {
46
+ }, W = {
46
47
  "--max-width": (t == null ? void 0 : t.display) === "max-width" ? t == null ? void 0 : t.maxWidth : "unset"
47
- }, f = {
48
+ }, g = {
48
49
  "no-image": e.noImage,
49
50
  "horizontal-image-right": e.layoutHImageRight,
50
51
  "horizontal-image-left": e.layoutHImageLeft,
51
52
  "vertical-image-top": e.layoutVImageTop,
52
53
  "vertical-image-bottom": e.layoutVImageBottom
53
- }[(i == null ? void 0 : i.orientation) ?? "horizontal-image-right"], x = {
54
+ }[(i == null ? void 0 : i.orientation) ?? "horizontal-image-right"], N = {
54
55
  horizontal: e.headingHorizontal,
55
56
  vertical: e.headingVertical
56
- }[o.headingLayout ?? "horizontal"], I = {
57
+ }[a.headingLayout ?? "horizontal"], k = {
57
58
  default: e.default,
58
59
  "max-width": e.maxWidth,
59
60
  "full-bleed": e.fullBleed
60
- }[(t == null ? void 0 : t.display) ?? "default"], V = () => {
61
- var p;
62
- if (!s) return null;
63
- const l = s.includes("vimeo.com"), W = s.includes("youtube.com") || s.includes("youtu.be");
64
- return l || W ? /* @__PURE__ */ r("div", { style: { maxWidth: (t == null ? void 0 : t.maxWidth) ?? "unset", flex: 0.65 }, children: /* @__PURE__ */ r("div", { className: e.videoWrapper, children: /* @__PURE__ */ r(
61
+ }[(t == null ? void 0 : t.display) ?? "default"];
62
+ let d;
63
+ t != null && t.imageUrls && (d = u === "dark" && ((v = t.imageUrls.dark) == null ? void 0 : v.medium) || t.imageUrls.default.medium);
64
+ let y = ((f = (b = t == null ? void 0 : t[u === "dark" ? "darkImage" : "defaultImage"]) == null ? void 0 : b.asset) == null ? void 0 : f.altText) || ((I = (x = t == null ? void 0 : t[u === "dark" ? "darkImage" : "defaultImage"]) == null ? void 0 : x.asset) == null ? void 0 : I.description) || "Card image";
65
+ const H = () => {
66
+ if (!o) return null;
67
+ const s = o.includes("vimeo.com"), w = o.includes("youtube.com") || o.includes("youtu.be");
68
+ return s || w ? /* @__PURE__ */ r("div", { style: { maxWidth: (t == null ? void 0 : t.maxWidth) ?? "unset", flex: 0.65 }, children: /* @__PURE__ */ r("div", { className: e.videoWrapper, children: /* @__PURE__ */ r(
65
69
  "iframe",
66
70
  {
67
- src: l ? `${s}?autoplay=0&muted=0&loop=0` : `${s}?autoplay=0&mute=0&loop=0}`,
71
+ src: s ? `${o}?autoplay=0&muted=0&loop=0` : `${o}?autoplay=0&mute=0&loop=0}`,
68
72
  allow: "autoplay; fullscreen",
69
73
  allowFullScreen: !0
70
74
  }
@@ -76,55 +80,48 @@ function A({
76
80
  width: "100%",
77
81
  flex: 0.65
78
82
  },
79
- children: /* @__PURE__ */ r("div", { className: e.videoWrapper, children: /* @__PURE__ */ r(
80
- "video",
81
- {
82
- src: s,
83
- controls: !0,
84
- poster: ((p = t == null ? void 0 : t.imageUrls) == null ? void 0 : p.medium) || void 0
85
- }
86
- ) })
83
+ children: /* @__PURE__ */ r("div", { className: e.videoWrapper, children: /* @__PURE__ */ r("video", { src: o, controls: !0, poster: d || void 0 }) })
87
84
  }
88
85
  );
89
86
  };
90
- return /* @__PURE__ */ r("section", { className: `${v} ${e.content}`, children: /* @__PURE__ */ a(
87
+ return /* @__PURE__ */ r("section", { className: `${V} ${e.content}`, children: /* @__PURE__ */ c(
91
88
  "article",
92
89
  {
93
- className: `${e.container} ${f}`,
94
- style: m || {},
90
+ className: `${e.container} ${g}`,
91
+ style: p || {},
95
92
  children: [
96
- /* @__PURE__ */ a("div", { className: `${e.heading} ${x}`, children: [
97
- /* @__PURE__ */ a("div", { className: e.titleWrapper, children: [
98
- o.eyebrow && /* @__PURE__ */ r(c, { blocks: o.eyebrow }),
99
- o.title && /* @__PURE__ */ r(c, { className: e.title, blocks: o.title })
93
+ /* @__PURE__ */ c("div", { className: `${e.heading} ${N}`, children: [
94
+ /* @__PURE__ */ c("div", { className: e.titleWrapper, children: [
95
+ a.eyebrow && /* @__PURE__ */ r(n, { blocks: a.eyebrow }),
96
+ a.title && /* @__PURE__ */ r(n, { className: e.title, blocks: a.title })
100
97
  ] }),
101
- ((o == null ? void 0 : o.description) || (n == null ? void 0 : n.items)) && /* @__PURE__ */ a("div", { className: e.text, children: [
102
- o.description && /* @__PURE__ */ r(c, { blocks: o.description }),
103
- _ && /* @__PURE__ */ r("div", { className: e.metrics, children: _.map((l) => /* @__PURE__ */ a("div", { className: e.metric, children: [
104
- /* @__PURE__ */ r("div", { className: e.metricValue, children: l.metricValue }),
105
- l.metricDescription && /* @__PURE__ */ r(c, { blocks: l.metricDescription })
106
- ] }, l._key)) }),
107
- n && /* @__PURE__ */ r(
108
- N,
98
+ ((a == null ? void 0 : a.description) || (l == null ? void 0 : l.items)) && /* @__PURE__ */ c("div", { className: e.text, children: [
99
+ a.description && /* @__PURE__ */ r(n, { blocks: a.description }),
100
+ _ && /* @__PURE__ */ r("div", { className: e.metrics, children: _.map((s) => /* @__PURE__ */ c("div", { className: e.metric, children: [
101
+ /* @__PURE__ */ r("div", { className: e.metricValue, children: s.metricValue }),
102
+ s.metricDescription && /* @__PURE__ */ r(n, { blocks: s.metricDescription })
103
+ ] }, s._key)) }),
104
+ l && /* @__PURE__ */ r(
105
+ B,
109
106
  {
110
107
  className: e.cta,
111
- items: n.items,
112
- alignment: n.alignment
108
+ items: l.items,
109
+ alignment: l.alignment
113
110
  }
114
111
  ),
115
- d && /* @__PURE__ */ r(c, { className: e.disclaimer, blocks: d })
112
+ h && /* @__PURE__ */ r(n, { className: e.disclaimer, blocks: h })
116
113
  ] })
117
114
  ] }),
118
- (i == null ? void 0 : i.orientation) !== "no-image" && s ? V() : (i == null ? void 0 : i.orientation) !== "no-image" && t && t.imageUrls && /* @__PURE__ */ r(
115
+ (i == null ? void 0 : i.orientation) !== "no-image" && o ? H() : (i == null ? void 0 : i.orientation) !== "no-image" && t && d && /* @__PURE__ */ r(
119
116
  "div",
120
117
  {
121
- className: `${e.image} ${I}`,
122
- style: b,
118
+ className: `${e.image} ${k}`,
119
+ style: W,
123
120
  children: /* @__PURE__ */ r(
124
- y,
121
+ $,
125
122
  {
126
- src: (h = t == null ? void 0 : t.imageUrls) == null ? void 0 : h.medium,
127
- alt: (t == null ? void 0 : t.asset.altText) || (t == null ? void 0 : t.asset.description) || "Content image",
123
+ src: d,
124
+ alt: y,
128
125
  width: 600,
129
126
  height: 400,
130
127
  priority: !0
@@ -137,5 +134,5 @@ function A({
137
134
  ) });
138
135
  }
139
136
  export {
140
- A as ContentBlock
137
+ lt as ContentBlock
141
138
  };
@@ -1,6 +1,6 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../../assets/index67.css');const e=require("react/jsx-runtime"),j=require("react"),S=require("./HeroContext.cjs"),c=require("../../ui/PortableTextRenderer/index.cjs"),b=require("../../ui/CallToActions/index.cjs"),m=require("next/image"),N=require("../../ui/LocaleLink/index.cjs"),W=require("../../hooks/usePrefersReducedMotion.cjs"),E=require("../../../createLucideIcon-DpotSgUx.cjs"),M=require("../../../play-CQBnZgNa.cjs");/**
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../../assets/index67.css');const e=require("react/jsx-runtime"),g=require("react"),G=require("./HeroContext.cjs"),o=require("../../ui/PortableTextRenderer/index.cjs"),k=require("../../ui/CallToActions/index.cjs"),v=require("next/image"),$=require("../../ui/LocaleLink/index.cjs"),J=require("../../hooks/usePrefersReducedMotion.cjs"),K=require("../../contexts/ThemeContext.cjs"),Q=require("../../../createLucideIcon-DpotSgUx.cjs"),X=require("../../../play-CQBnZgNa.cjs");/**
2
2
  * @license lucide-react v0.488.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
5
5
  * See the LICENSE file in the root directory of this source tree.
6
- */const V=[["rect",{x:"14",y:"4",width:"4",height:"16",rx:"1",key:"zuxfzm"}],["rect",{x:"6",y:"4",width:"4",height:"16",rx:"1",key:"1okwgv"}]],Y=E.createLucideIcon("pause",V),G="_hero_fhigw_1",J="_container_fhigw_7",K="_eyebrow_fhigw_24",Q="_disclaimer_fhigw_28",X="_text_fhigw_33",Z="_articleDetails_fhigw_40",A="_articleType_fhigw_53",D="_articleCategories_fhigw_67",O="_category_fhigw_73",ee="_number_fhigw_89",se="_blog_fhigw_116",te="_overlay_fhigw_140",re="_fullBleed_fhigw_210",le="_split_fhigw_304",oe="_image_fhigw_309",ce="_videoControl_fhigw_332",ie="_videoWrapper_fhigw_353",ne="_videoBackground_fhigw_373",ae="_iframe_fhigw_374",t={hero:G,container:J,eyebrow:K,disclaimer:Q,text:X,articleDetails:Z,articleType:A,articleCategories:D,category:O,number:ee,default:"_default_fhigw_112",blog:se,overlay:te,fullBleed:re,split:le,image:oe,videoControl:ce,videoWrapper:ie,videoBackground:ne,iframe:ae};function ue({heading:o,image:s,video:r,callToAction:i,pageData:a,styleOptions:d}){var I,L,P,q,F,U,H;const x=W.usePrefersReducedMotion(),[C,R]=j.useState(!x),{setIsFullbleedHeroAtTop:$}=S.useHeroContext(),_=j.useRef(null),y=(d==null?void 0:d.layout)??"default",z=((I=d==null?void 0:d.padding)==null?void 0:I.join(" "))??"",w={default:t.default,split:t.split,"split-35-65":t.split,"full-bleed":t.fullBleed,blog:t.blog}[y],T=((L=a==null?void 0:a.categories)==null?void 0:L.filter(l=>{var n,u;return!((u=(n=l.slug)==null?void 0:n.current)!=null&&u.startsWith("library/type"))}))??[],h=T[0]??null,f=T[1]??null,p=((P=a==null?void 0:a.categories)==null?void 0:P.find(l=>{var n,u;return(u=(n=l.slug)==null?void 0:n.current)==null?void 0:u.startsWith("library/type")}))??null;j.useEffect(()=>{const l=()=>{$(window.scrollY===0)};if(y==="full-bleed"&&typeof window<"u")return $(!0),window.addEventListener("scroll",l),()=>window.removeEventListener("scroll",l)},[y]),j.useEffect(()=>{const l=_.current;l&&(x?l.pause():l.play())},[x]);const k=()=>e.jsx("button",{title:`${C?"Pause the video":"Play the video"}`,className:t.videoControl,onClick:()=>{const l=_.current;l&&(l.paused?(l.play().catch(()=>{}),R(!0)):(l.pause(),R(!1)))},children:C?e.jsx(Y,{size:18}):e.jsx(M.Play,{size:18})}),B=()=>{var u;if(!r)return null;const l=r.includes("vimeo.com"),n=r.includes("youtube.com")||r.includes("youtu.be");return l||n?e.jsx("div",{className:t.videoWrapper,children:e.jsx("iframe",{src:l?`${r}?autoplay=1&muted=1&loop=1&background=1`:`${r}?autoplay=1&mute=1&loop=1&playlist=${v(r)}`,allow:"autoplay; fullscreen",allowFullScreen:!0})}):e.jsxs("div",{className:t.videoWrapper,children:[e.jsx(k,{}),e.jsx("video",{ref:_,src:r,autoPlay:!x,loop:!0,muted:!0,playsInline:!0,poster:((u=s==null?void 0:s.imageUrls)==null?void 0:u.large)||void 0,preload:"metadata"})]})};function v(l){const n=l.match(/(?:youtube\.com\/.*v=|youtu\.be\/)([^&?/]+)/);return(n==null?void 0:n[1])||""}const g=()=>{var l;return s&&s.imageUrls?e.jsx("div",{className:t.image,children:y==="blog"||y==="full-bleed"?e.jsx(m,{src:(l=s==null?void 0:s.imageUrls)==null?void 0:l.large,alt:(s==null?void 0:s.asset.altText)||(s==null?void 0:s.asset.description)||"Hero image",fill:!0,priority:!0,style:{objectFit:"cover"},draggable:!1,sizes:"(max-width: 767px) 600px, 1200px"}):e.jsx(m,{src:s.imageUrls.medium,alt:s.asset.altText||s.asset.description||"Hero image",width:650,height:750,priority:!0})}):null};switch(y){case"split-35-65":case"split":return e.jsx("section",{className:`${t.hero} ${t.split}`,children:e.jsxs("article",{className:`${z} ${t.container}`,children:[e.jsxs("div",{className:t.text,children:[e.jsxs("div",{children:[o.eyebrow&&e.jsx(c.RichText,{className:t.eyebrow,blocks:o.eyebrow}),e.jsx(c.RichText,{blocks:o.title})]}),o.description&&e.jsx(c.RichText,{blocks:o.description}),i&&e.jsx(b.CallToActions,{items:i.items,alignment:i.alignment}),o.disclaimer&&e.jsx(c.RichText,{className:t.disclaimer,blocks:o.disclaimer})]}),r?e.jsx(B,{}):e.jsx(g,{})]})});case"default":return e.jsx("section",{className:`${t.hero} ${w}`,children:e.jsxs("article",{className:t.container,children:[r?e.jsx(B,{}):e.jsx(g,{}),e.jsxs("div",{className:t.text,children:[e.jsxs("div",{children:[o.eyebrow&&e.jsx(c.RichText,{className:t.eyebrow,blocks:o.eyebrow}),e.jsx(c.RichText,{blocks:o.title})]}),o.description&&e.jsx(c.RichText,{blocks:o.description}),i&&e.jsx(b.CallToActions,{items:i.items,alignment:i.alignment})]})]})});case"full-bleed":return e.jsx("section",{className:`${t.hero} ${w} heroFullBleed`,children:e.jsxs("article",{className:t.container,children:[r?r.includes("vimeo.com")||r.includes("youtube.com")||r.includes("youtu.be")?e.jsx("div",{className:t.videoBackground,children:e.jsx("iframe",{src:r.includes("vimeo.com")?`${r}?autoplay=1&muted=1&loop=1&background=1`:`${r}?autoplay=1&mute=1&loop=1&playlist=${v(r)}`,className:t.iframe,allow:"autoplay; fullscreen",allowFullScreen:!0})}):e.jsxs(e.Fragment,{children:[e.jsx(k,{}),e.jsx("video",{ref:_,className:t.videoBackground,src:r,autoPlay:!x,loop:!0,muted:!0,playsInline:!0,poster:((q=s==null?void 0:s.imageUrls)==null?void 0:q.large)||void 0})]}):e.jsx(m,{src:((F=s==null?void 0:s.imageUrls)==null?void 0:F.medium)??"",alt:(s==null?void 0:s.asset.altText)||(s==null?void 0:s.asset.description)||"Card image",fill:!0,priority:!0,style:{objectFit:"cover"},draggable:!1,sizes:"(min-width: 500px) 500px, 100vw"}),e.jsx("div",{className:t.overlay,children:e.jsxs("div",{className:t.text,children:[e.jsxs("div",{children:[o.eyebrow&&e.jsx(c.RichText,{className:t.eyebrow,blocks:o.eyebrow}),e.jsx(c.RichText,{blocks:o.title})]}),o.description&&e.jsx(c.RichText,{blocks:o.description}),i&&e.jsx(b.CallToActions,{items:i.items,alignment:i.alignment})]})})]})});case"blog":return e.jsx("section",{className:`${t.hero} ${w}`,children:e.jsxs("article",{className:t.container,children:[r?r.includes("vimeo.com")||r.includes("youtube.com")||r.includes("youtu.be")?e.jsx("div",{className:t.videoBackground,children:e.jsx("iframe",{src:r.includes("vimeo.com")?`${r}?autoplay=1&muted=1&loop=1&background=1`:`${r}?autoplay=1&mute=1&loop=1&playlist=${v(r)}`,className:t.iframe,allow:"autoplay; fullscreen",allowFullScreen:!0})}):e.jsxs(e.Fragment,{children:[e.jsx(k,{}),e.jsx("video",{ref:_,className:t.videoBackground,src:r,autoPlay:!x,loop:!0,muted:!0,playsInline:!0,poster:((U=s==null?void 0:s.imageUrls)==null?void 0:U.large)||void 0})]}):e.jsx(m,{src:((H=s==null?void 0:s.imageUrls)==null?void 0:H.large)??"",alt:(s==null?void 0:s.asset.altText)||(s==null?void 0:s.asset.description)||"Card image",fill:!0,priority:!0,style:{objectFit:"cover"},draggable:!1,sizes:"(min-width: 500px) 500px, 100vw"}),e.jsx("div",{className:t.overlay,children:e.jsxs("div",{className:t.text,children:[e.jsxs("div",{children:[o.eyebrow&&e.jsx(c.RichText,{className:t.eyebrow,blocks:o.eyebrow}),a&&e.jsxs("div",{className:t.articleDetails,children:[p&&e.jsx(N.LocaleLink,{href:`/blog/search?categories=${encodeURIComponent(p._id)}`,className:t.articleType,children:p.title},p._id),e.jsxs("div",{className:t.articleCategories,children:[h&&e.jsx(N.LocaleLink,{href:`/blog/search?categories=${encodeURIComponent(h._id)}`,className:t.category,children:h.title},h._id),f&&f.title.toLowerCase()!=="library"&&!f.slug.current.includes("keywords")&&e.jsx(N.LocaleLink,{href:`/blog/search?categories=${encodeURIComponent(f._id)}`,className:t.category,children:f.title},f._id)]}),a.timeToRead&&e.jsx(e.Fragment,{children:e.jsxs("span",{children:[e.jsx("span",{className:t.number,children:a.timeToRead}),"min read"]})})]}),e.jsx(c.RichText,{blocks:o.title})]}),o.description&&e.jsx(c.RichText,{blocks:o.description}),i&&e.jsx(b.CallToActions,{items:i.items,alignment:i.alignment})]})})]})})}}exports.HeroBlock=ue;
6
+ */const Z=[["rect",{x:"14",y:"4",width:"4",height:"16",rx:"1",key:"zuxfzm"}],["rect",{x:"6",y:"4",width:"4",height:"16",rx:"1",key:"1okwgv"}]],A=Q.createLucideIcon("pause",Z),D="_hero_fhigw_1",O="_container_fhigw_7",ee="_eyebrow_fhigw_24",se="_disclaimer_fhigw_28",te="_text_fhigw_33",re="_articleDetails_fhigw_40",le="_articleType_fhigw_53",ce="_articleCategories_fhigw_67",oe="_category_fhigw_73",ie="_number_fhigw_89",ae="_blog_fhigw_116",ne="_overlay_fhigw_140",ue="_fullBleed_fhigw_210",de="_split_fhigw_304",xe="_image_fhigw_309",me="_videoControl_fhigw_332",fe="_videoWrapper_fhigw_353",_e="_videoBackground_fhigw_373",ye="_iframe_fhigw_374",s={hero:D,container:O,eyebrow:ee,disclaimer:se,text:te,articleDetails:re,articleType:le,articleCategories:ce,category:oe,number:ie,default:"_default_fhigw_112",blog:ae,overlay:ne,fullBleed:ue,split:de,image:xe,videoControl:me,videoWrapper:fe,videoBackground:_e,iframe:ye};function he({heading:r,image:c,video:t,callToAction:i,pageData:n,styleOptions:u}){var U,F,z,S,W,H,E,M,V;const d=J.usePrefersReducedMotion(),[T,I]=g.useState(!d),{mode:h}=K.useTheme(),{setIsFullbleedHeroAtTop:B}=G.useHeroContext(),_=g.useRef(null),x=(u==null?void 0:u.layout)??"default",Y=((U=u==null?void 0:u.padding)==null?void 0:U.join(" "))??"",N={default:s.default,split:s.split,"split-35-65":s.split,"full-bleed":s.fullBleed,blog:s.blog}[x],L=((F=n==null?void 0:n.categories)==null?void 0:F.filter(l=>{var a,y;return!((y=(a=l.slug)==null?void 0:a.current)!=null&&y.startsWith("library/type"))}))??[],j=L[0]??null,m=L[1]??null,b=((z=n==null?void 0:n.categories)==null?void 0:z.find(l=>{var a,y;return(y=(a=l.slug)==null?void 0:a.current)==null?void 0:y.startsWith("library/type")}))??null;g.useEffect(()=>{const l=()=>{B(window.scrollY===0)};if(x==="full-bleed"&&typeof window<"u")return B(!0),window.addEventListener("scroll",l),()=>window.removeEventListener("scroll",l)},[x]),g.useEffect(()=>{const l=_.current;l&&(d?l.pause():l.play())},[d]);let p,f;c!=null&&c.imageUrls&&(p=h==="dark"&&((S=c.imageUrls.dark)==null?void 0:S.medium)||c.imageUrls.default.medium,f=h==="dark"&&((W=c.imageUrls.dark)==null?void 0:W.large)||c.imageUrls.default.large);let w=((E=(H=c==null?void 0:c[h==="dark"?"darkImage":"defaultImage"])==null?void 0:H.asset)==null?void 0:E.altText)||((V=(M=c==null?void 0:c[h==="dark"?"darkImage":"defaultImage"])==null?void 0:M.asset)==null?void 0:V.description)||"Card image";const C=()=>e.jsx("button",{title:`${T?"Pause the video":"Play the video"}`,className:s.videoControl,onClick:()=>{const l=_.current;l&&(l.paused?(l.play().catch(()=>{}),I(!0)):(l.pause(),I(!1)))},children:T?e.jsx(A,{size:18}):e.jsx(X.Play,{size:18})}),P=()=>{if(!t)return null;const l=t.includes("vimeo.com"),a=t.includes("youtube.com")||t.includes("youtu.be");return l||a?e.jsx("div",{className:s.videoWrapper,children:e.jsx("iframe",{src:l?`${t}?autoplay=1&muted=1&loop=1&background=1`:`${t}?autoplay=1&mute=1&loop=1&playlist=${R(t)}`,allow:"autoplay; fullscreen",allowFullScreen:!0})}):e.jsxs("div",{className:s.videoWrapper,children:[e.jsx(C,{}),e.jsx("video",{ref:_,src:t,autoPlay:!d,loop:!0,muted:!0,playsInline:!0,poster:f||void 0,preload:"metadata"})]})};function R(l){const a=l.match(/(?:youtube\.com\/.*v=|youtu\.be\/)([^&?/]+)/);return(a==null?void 0:a[1])||""}const q=()=>c&&p?e.jsx("div",{className:s.image,children:x==="blog"||x==="full-bleed"?e.jsx(v,{src:p,alt:w,fill:!0,priority:!0,style:{objectFit:"cover"},draggable:!1,sizes:"(max-width: 767px) 600px, 1200px"}):e.jsx(v,{src:p,alt:w,width:650,height:750,priority:!0})}):null;switch(x){case"split-35-65":case"split":return e.jsx("section",{className:`${s.hero} ${s.split}`,children:e.jsxs("article",{className:`${Y} ${s.container}`,children:[e.jsxs("div",{className:s.text,children:[e.jsxs("div",{children:[r.eyebrow&&e.jsx(o.RichText,{className:s.eyebrow,blocks:r.eyebrow}),e.jsx(o.RichText,{blocks:r.title})]}),r.description&&e.jsx(o.RichText,{blocks:r.description}),i&&e.jsx(k.CallToActions,{items:i.items,alignment:i.alignment}),r.disclaimer&&e.jsx(o.RichText,{className:s.disclaimer,blocks:r.disclaimer})]}),t?e.jsx(P,{}):e.jsx(q,{})]})});case"default":return e.jsx("section",{className:`${s.hero} ${N}`,children:e.jsxs("article",{className:s.container,children:[t?e.jsx(P,{}):e.jsx(q,{}),e.jsxs("div",{className:s.text,children:[e.jsxs("div",{children:[r.eyebrow&&e.jsx(o.RichText,{className:s.eyebrow,blocks:r.eyebrow}),e.jsx(o.RichText,{blocks:r.title})]}),r.description&&e.jsx(o.RichText,{blocks:r.description}),i&&e.jsx(k.CallToActions,{items:i.items,alignment:i.alignment})]})]})});case"full-bleed":return e.jsx("section",{className:`${s.hero} ${N} heroFullBleed`,children:e.jsxs("article",{className:s.container,children:[t?t.includes("vimeo.com")||t.includes("youtube.com")||t.includes("youtu.be")?e.jsx("div",{className:s.videoBackground,children:e.jsx("iframe",{src:t.includes("vimeo.com")?`${t}?autoplay=1&muted=1&loop=1&background=1`:`${t}?autoplay=1&mute=1&loop=1&playlist=${R(t)}`,className:s.iframe,allow:"autoplay; fullscreen",allowFullScreen:!0})}):e.jsxs(e.Fragment,{children:[e.jsx(C,{}),e.jsx("video",{ref:_,className:s.videoBackground,src:t,autoPlay:!d,loop:!0,muted:!0,playsInline:!0,poster:f||void 0})]}):e.jsx(v,{src:f??"",alt:w,fill:!0,priority:!0,style:{objectFit:"cover"},draggable:!1,sizes:"(min-width: 500px) 500px, 100vw"}),e.jsx("div",{className:s.overlay,children:e.jsxs("div",{className:s.text,children:[e.jsxs("div",{children:[r.eyebrow&&e.jsx(o.RichText,{className:s.eyebrow,blocks:r.eyebrow}),e.jsx(o.RichText,{blocks:r.title})]}),r.description&&e.jsx(o.RichText,{blocks:r.description}),i&&e.jsx(k.CallToActions,{items:i.items,alignment:i.alignment})]})})]})});case"blog":return e.jsx("section",{className:`${s.hero} ${N}`,children:e.jsxs("article",{className:s.container,children:[t?t.includes("vimeo.com")||t.includes("youtube.com")||t.includes("youtu.be")?e.jsx("div",{className:s.videoBackground,children:e.jsx("iframe",{src:t.includes("vimeo.com")?`${t}?autoplay=1&muted=1&loop=1&background=1`:`${t}?autoplay=1&mute=1&loop=1&playlist=${R(t)}`,className:s.iframe,allow:"autoplay; fullscreen",allowFullScreen:!0})}):e.jsxs(e.Fragment,{children:[e.jsx(C,{}),e.jsx("video",{ref:_,className:s.videoBackground,src:t,autoPlay:!d,loop:!0,muted:!0,playsInline:!0,poster:f||void 0})]}):e.jsx(v,{src:f??"",alt:w,fill:!0,priority:!0,style:{objectFit:"cover"},draggable:!1,sizes:"(min-width: 500px) 500px, 100vw"}),e.jsx("div",{className:s.overlay,children:e.jsxs("div",{className:s.text,children:[e.jsxs("div",{children:[r.eyebrow&&e.jsx(o.RichText,{className:s.eyebrow,blocks:r.eyebrow}),n&&e.jsxs("div",{className:s.articleDetails,children:[b&&e.jsx($.LocaleLink,{href:`/blog/search?categories=${encodeURIComponent(b._id)}`,className:s.articleType,children:b.title},b._id),e.jsxs("div",{className:s.articleCategories,children:[j&&e.jsx($.LocaleLink,{href:`/blog/search?categories=${encodeURIComponent(j._id)}`,className:s.category,children:j.title},j._id),m&&m.title.toLowerCase()!=="library"&&!m.slug.current.includes("keywords")&&e.jsx($.LocaleLink,{href:`/blog/search?categories=${encodeURIComponent(m._id)}`,className:s.category,children:m.title},m._id)]}),n.timeToRead&&e.jsx(e.Fragment,{children:e.jsxs("span",{children:[e.jsx("span",{className:s.number,children:n.timeToRead}),"min read"]})})]}),e.jsx(o.RichText,{blocks:r.title})]}),r.description&&e.jsx(o.RichText,{blocks:r.description}),i&&e.jsx(k.CallToActions,{items:i.items,alignment:i.alignment})]})})]})})}}exports.HeroBlock=he;