keystone-design-bootstrap 1.0.69 → 1.0.70
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/design_system/sections/index.js +110 -60
- package/dist/design_system/sections/index.js.map +1 -1
- package/dist/index.js +117 -61
- package/dist/index.js.map +1 -1
- package/dist/lib/server-api.d.ts +9 -1
- package/dist/lib/server-api.js +11 -0
- package/dist/lib/server-api.js.map +1 -1
- package/dist/tracking/index.d.ts +134 -5
- package/dist/tracking/index.js +123 -0
- package/dist/tracking/index.js.map +1 -1
- package/package.json +1 -1
- package/src/design_system/sections/header-navigation.aman.tsx +6 -1
- package/src/design_system/sections/header-navigation.balance.tsx +6 -1
- package/src/design_system/sections/header-navigation.barelux.tsx +6 -1
- package/src/design_system/sections/header-navigation.tsx +6 -1
- package/src/next/layouts/root-layout.tsx +12 -0
|
@@ -6277,6 +6277,12 @@ function firePixelEvent(event, params, eventId) {
|
|
|
6277
6277
|
fbq("track", event, customData, eventData);
|
|
6278
6278
|
}
|
|
6279
6279
|
|
|
6280
|
+
// src/tracking/captureEvent.ts
|
|
6281
|
+
import posthog from "posthog-js";
|
|
6282
|
+
function captureEvent(event, ...args) {
|
|
6283
|
+
posthog.capture(event, args[0]);
|
|
6284
|
+
}
|
|
6285
|
+
|
|
6280
6286
|
// src/next/contexts/form-definitions.tsx
|
|
6281
6287
|
import React19, { createContext as createContext9, useContext as useContext10 } from "react";
|
|
6282
6288
|
var FormDefinitionsContext = createContext9({
|
|
@@ -6333,14 +6339,18 @@ var ContactSectionForm = ({
|
|
|
6333
6339
|
onSuccess == null ? void 0 : onSuccess();
|
|
6334
6340
|
await setPixelUserData({ email: data.email, phone: data.phone });
|
|
6335
6341
|
firePixelEvent("Lead", void 0, result.eventId);
|
|
6342
|
+
captureEvent("form_submitted", __spreadValues({ form_type: "lead" }, result.eventId && { event_id: result.eventId }));
|
|
6336
6343
|
setTimeout(() => setSubmitStatus("idle"), 5e3);
|
|
6337
6344
|
} else {
|
|
6345
|
+
const errorMsg = result.error || "Something went wrong. Please try again.";
|
|
6338
6346
|
setSubmitStatus("error");
|
|
6339
|
-
setStatusMessage(
|
|
6347
|
+
setStatusMessage(errorMsg);
|
|
6348
|
+
captureEvent("form_failed", { form_type: "lead", error: errorMsg });
|
|
6340
6349
|
}
|
|
6341
6350
|
} catch (e2) {
|
|
6342
6351
|
setSubmitStatus("error");
|
|
6343
6352
|
setStatusMessage("Network error. Please try again later.");
|
|
6353
|
+
captureEvent("form_failed", { form_type: "lead", error: "network_error" });
|
|
6344
6354
|
}
|
|
6345
6355
|
setIsSubmitting(false);
|
|
6346
6356
|
};
|
|
@@ -6613,16 +6623,21 @@ function HeaderNavigation({
|
|
|
6613
6623
|
companyInformation,
|
|
6614
6624
|
websitePhotos
|
|
6615
6625
|
}) {
|
|
6616
|
-
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
6626
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j;
|
|
6617
6627
|
const headerRef = useRef7(null);
|
|
6618
6628
|
const navigation = navigationOverride || ((_a = config == null ? void 0 : config.navigation) == null ? void 0 : _a.header) || [];
|
|
6619
6629
|
const logoImage = logoImageOverride || getLogoUrl(websitePhotos) || ((_b = props == null ? void 0 : props.logo) == null ? void 0 : _b.image);
|
|
6620
6630
|
const logoText = logoTextOverride || (companyInformation == null ? void 0 : companyInformation.company_name) || ((_c = props == null ? void 0 : props.logo) == null ? void 0 : _c.text) || "";
|
|
6621
6631
|
const cta_button = props == null ? void 0 : props.cta_button;
|
|
6622
|
-
const
|
|
6632
|
+
const resolvedCtaUrls = resolveCtaUrls(companyInformation);
|
|
6633
|
+
const ctaUrls = {
|
|
6634
|
+
primaryHref: (_d = cta_button == null ? void 0 : cta_button.secondary_href) != null ? _d : resolvedCtaUrls.primaryHref,
|
|
6635
|
+
secondaryHref: (_e = cta_button == null ? void 0 : cta_button.href) != null ? _e : resolvedCtaUrls.secondaryHref,
|
|
6636
|
+
hasSecondary: (cta_button == null ? void 0 : cta_button.secondary_href) != null || resolvedCtaUrls.hasSecondary
|
|
6637
|
+
};
|
|
6623
6638
|
const logo = {
|
|
6624
6639
|
text: logoText || "",
|
|
6625
|
-
href: ((
|
|
6640
|
+
href: ((_f = props == null ? void 0 : props.logo) == null ? void 0 : _f.href) || "/",
|
|
6626
6641
|
image: logoImage
|
|
6627
6642
|
};
|
|
6628
6643
|
const dynamicNavigation = navigation;
|
|
@@ -6730,7 +6745,7 @@ function HeaderNavigation({
|
|
|
6730
6745
|
width: 32,
|
|
6731
6746
|
height: 32
|
|
6732
6747
|
}
|
|
6733
|
-
) : /* @__PURE__ */ React22.createElement("div", { className: "h-8 w-8 bg-blue-600 rounded-lg flex items-center justify-center" }, /* @__PURE__ */ React22.createElement("span", { className: "text-white font-bold text-lg" }, ((
|
|
6748
|
+
) : /* @__PURE__ */ React22.createElement("div", { className: "h-8 w-8 bg-blue-600 rounded-lg flex items-center justify-center" }, /* @__PURE__ */ React22.createElement("span", { className: "text-white font-bold text-lg" }, ((_g = logoText == null ? void 0 : logoText.charAt(0)) == null ? void 0 : _g.toUpperCase()) || "")), /* @__PURE__ */ React22.createElement("span", { className: "text-xl font-bold text-primary hidden md:block" }, logoText)), /* @__PURE__ */ React22.createElement("nav", { className: "max-md:hidden" }, /* @__PURE__ */ React22.createElement("ul", { className: "flex items-center gap-0.5" }, headerNavItems.map((navItem) => /* @__PURE__ */ React22.createElement("li", { key: navItem.label }, navItem.menu ? /* @__PURE__ */ React22.createElement(HoverDropdown, { label: navItem.label, href: navItem.href }, navItem.menu) : /* @__PURE__ */ React22.createElement(
|
|
6734
6749
|
Link4,
|
|
6735
6750
|
{
|
|
6736
6751
|
href: navItem.href || "#",
|
|
@@ -6751,7 +6766,7 @@ function HeaderNavigation({
|
|
|
6751
6766
|
Button2,
|
|
6752
6767
|
{
|
|
6753
6768
|
href: ctaUrls.primaryHref,
|
|
6754
|
-
target: (
|
|
6769
|
+
target: (_h = cta_button == null ? void 0 : cta_button.target) != null ? _h : isExternalCtaUrl(ctaUrls.primaryHref) ? "_blank" : void 0,
|
|
6755
6770
|
rel: (cta_button == null ? void 0 : cta_button.target) === "_blank" || isExternalCtaUrl(ctaUrls.primaryHref) ? "noopener noreferrer" : void 0,
|
|
6756
6771
|
color: "primary",
|
|
6757
6772
|
size: "lg"
|
|
@@ -6828,7 +6843,7 @@ function HeaderNavigation({
|
|
|
6828
6843
|
Button2,
|
|
6829
6844
|
{
|
|
6830
6845
|
href: ctaUrls.primaryHref,
|
|
6831
|
-
target: (
|
|
6846
|
+
target: (_i = cta_button == null ? void 0 : cta_button.target) != null ? _i : isExternalCtaUrl(ctaUrls.primaryHref) ? "_blank" : void 0,
|
|
6832
6847
|
rel: (cta_button == null ? void 0 : cta_button.target) === "_blank" || isExternalCtaUrl(ctaUrls.primaryHref) ? "noopener noreferrer" : void 0,
|
|
6833
6848
|
color: "primary",
|
|
6834
6849
|
size: "lg"
|
|
@@ -6850,7 +6865,7 @@ function HeaderNavigation({
|
|
|
6850
6865
|
Button2,
|
|
6851
6866
|
{
|
|
6852
6867
|
href: ctaUrls.primaryHref,
|
|
6853
|
-
target: (
|
|
6868
|
+
target: (_j = cta_button == null ? void 0 : cta_button.target) != null ? _j : isExternalCtaUrl(ctaUrls.primaryHref) ? "_blank" : void 0,
|
|
6854
6869
|
rel: (cta_button == null ? void 0 : cta_button.target) === "_blank" || isExternalCtaUrl(ctaUrls.primaryHref) ? "noopener noreferrer" : void 0,
|
|
6855
6870
|
color: "primary",
|
|
6856
6871
|
className: `${(cta_button == null ? void 0 : cta_button.secondary_label) && ctaUrls.hasSecondary ? "flex-1" : "w-full"} font-body text-sm uppercase tracking-wide py-4 rounded-none`
|
|
@@ -8496,14 +8511,18 @@ var JobApplicationForm = ({ jobSlug, formDefinition, inline = false }) => {
|
|
|
8496
8511
|
setSubmitStatus("success");
|
|
8497
8512
|
setStatusMessage(result.message || "Thank you for applying! We'll be in touch soon.");
|
|
8498
8513
|
(_a = formRef.current) == null ? void 0 : _a.reset();
|
|
8514
|
+
captureEvent("form_submitted", { form_type: "job_application" });
|
|
8499
8515
|
setTimeout(() => setSubmitStatus("idle"), 5e3);
|
|
8500
8516
|
} else {
|
|
8517
|
+
const errorMsg = result.error || "Something went wrong. Please try again.";
|
|
8501
8518
|
setSubmitStatus("error");
|
|
8502
|
-
setStatusMessage(
|
|
8519
|
+
setStatusMessage(errorMsg);
|
|
8520
|
+
captureEvent("form_failed", { form_type: "job_application", error: errorMsg });
|
|
8503
8521
|
}
|
|
8504
8522
|
} catch (e2) {
|
|
8505
8523
|
setSubmitStatus("error");
|
|
8506
8524
|
setStatusMessage("Network error. Please try again.");
|
|
8525
|
+
captureEvent("form_failed", { form_type: "job_application", error: "network_error" });
|
|
8507
8526
|
}
|
|
8508
8527
|
setIsSubmitting(false);
|
|
8509
8528
|
};
|
|
@@ -8621,7 +8640,7 @@ function HeaderNavigation2({
|
|
|
8621
8640
|
companyInformation,
|
|
8622
8641
|
websitePhotos
|
|
8623
8642
|
}) {
|
|
8624
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y;
|
|
8643
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _A, _B, _C, _D;
|
|
8625
8644
|
const [activeDropdown, setActiveDropdown] = useState16(null);
|
|
8626
8645
|
const [isMobileMenuOpen, setIsMobileMenuOpen] = useState16(false);
|
|
8627
8646
|
const [dropdownTop, setDropdownTop] = useState16(0);
|
|
@@ -8645,7 +8664,12 @@ function HeaderNavigation2({
|
|
|
8645
8664
|
const logoUrl = logoImageOverride || getLogoUrl(websitePhotos) || ((_a = props == null ? void 0 : props.logo) == null ? void 0 : _a.image);
|
|
8646
8665
|
const companyName = logoTextOverride || (companyInformation == null ? void 0 : companyInformation.company_name) || ((_b = props == null ? void 0 : props.logo) == null ? void 0 : _b.text) || "";
|
|
8647
8666
|
const navigation = navigationOverride || ((_c = config == null ? void 0 : config.navigation) == null ? void 0 : _c.header) || [];
|
|
8648
|
-
const
|
|
8667
|
+
const resolvedCtaUrls = resolveCtaUrls(companyInformation);
|
|
8668
|
+
const ctaUrls = {
|
|
8669
|
+
primaryHref: (_e = (_d = props == null ? void 0 : props.cta_button) == null ? void 0 : _d.secondary_href) != null ? _e : resolvedCtaUrls.primaryHref,
|
|
8670
|
+
secondaryHref: (_g = (_f = props == null ? void 0 : props.cta_button) == null ? void 0 : _f.href) != null ? _g : resolvedCtaUrls.secondaryHref,
|
|
8671
|
+
hasSecondary: ((_h = props == null ? void 0 : props.cta_button) == null ? void 0 : _h.secondary_href) != null || resolvedCtaUrls.hasSecondary
|
|
8672
|
+
};
|
|
8649
8673
|
const pathname = usePathname2();
|
|
8650
8674
|
const portalPath = resolvePortalPath(companyInformation);
|
|
8651
8675
|
const isPortalPage = portalPath ? pathname == null ? void 0 : pathname.startsWith(portalPath) : false;
|
|
@@ -8703,7 +8727,7 @@ function HeaderNavigation2({
|
|
|
8703
8727
|
return /* @__PURE__ */ React36.createElement(React36.Fragment, null, /* @__PURE__ */ React36.createElement("header", { className: "hidden md:block sticky top-0 z-50 bg-primary border-b border-secondary transition-all duration-300" }, /* @__PURE__ */ React36.createElement("div", { className: "mx-auto max-w-container px-4 md:px-8" }, /* @__PURE__ */ React36.createElement("div", { className: cx(
|
|
8704
8728
|
"relative flex items-center justify-between transition-all duration-300",
|
|
8705
8729
|
isScrolled ? "py-2" : "py-8"
|
|
8706
|
-
) }, /* @__PURE__ */ React36.createElement(Link6, { href: ((
|
|
8730
|
+
) }, /* @__PURE__ */ React36.createElement(Link6, { href: ((_i = props == null ? void 0 : props.logo) == null ? void 0 : _i.href) || "/", className: "flex items-center" }, logoUrl && /* @__PURE__ */ React36.createElement(
|
|
8707
8731
|
Image11,
|
|
8708
8732
|
{
|
|
8709
8733
|
src: logoUrl,
|
|
@@ -8712,7 +8736,7 @@ function HeaderNavigation2({
|
|
|
8712
8736
|
width: 120,
|
|
8713
8737
|
height: 40
|
|
8714
8738
|
}
|
|
8715
|
-
)), /* @__PURE__ */ React36.createElement(Link6, { href: ((
|
|
8739
|
+
)), /* @__PURE__ */ React36.createElement(Link6, { href: ((_j = props == null ? void 0 : props.logo) == null ? void 0 : _j.href) || "/", className: "absolute left-1/2 transform -translate-x-1/2 font-display text-2xl md:text-3xl font-normal uppercase tracking-widest text-fg-primary", suppressHydrationWarning: true }, companyName), /* @__PURE__ */ React36.createElement("div", { className: "flex items-center gap-3" }, ((_k = props == null ? void 0 : props.cta_button) == null ? void 0 : _k.secondary_label) && ctaUrls.hasSecondary && /* @__PURE__ */ React36.createElement(
|
|
8716
8740
|
Button2,
|
|
8717
8741
|
{
|
|
8718
8742
|
href: ctaUrls.secondaryHref,
|
|
@@ -8727,13 +8751,13 @@ function HeaderNavigation2({
|
|
|
8727
8751
|
Button2,
|
|
8728
8752
|
{
|
|
8729
8753
|
href: ctaUrls.primaryHref,
|
|
8730
|
-
target: (
|
|
8731
|
-
rel: ((
|
|
8754
|
+
target: (_m = (_l = props == null ? void 0 : props.cta_button) == null ? void 0 : _l.target) != null ? _m : isExternalCtaUrl(ctaUrls.primaryHref) ? "_blank" : void 0,
|
|
8755
|
+
rel: ((_n = props == null ? void 0 : props.cta_button) == null ? void 0 : _n.target) === "_blank" || isExternalCtaUrl(ctaUrls.primaryHref) ? "noopener noreferrer" : void 0,
|
|
8732
8756
|
size: "sm",
|
|
8733
8757
|
color: "primary",
|
|
8734
8758
|
className: "font-body text-sm uppercase tracking-wide px-6 py-2 rounded-sm"
|
|
8735
8759
|
},
|
|
8736
|
-
((
|
|
8760
|
+
((_o = props == null ? void 0 : props.cta_button) == null ? void 0 : _o.secondary_label) && ctaUrls.hasSecondary ? props.cta_button.secondary_label : ((_p = props == null ? void 0 : props.cta_button) == null ? void 0 : _p.label) || "Contact"
|
|
8737
8761
|
))), /* @__PURE__ */ React36.createElement("nav", { className: "border-b border-secondary" }, /* @__PURE__ */ React36.createElement("div", { className: "flex items-center justify-center gap-8 py-4" }, navigation.map((item, i) => /* @__PURE__ */ React36.createElement(
|
|
8738
8762
|
"div",
|
|
8739
8763
|
{
|
|
@@ -8790,7 +8814,7 @@ function HeaderNavigation2({
|
|
|
8790
8814
|
"aria-label": "Open menu"
|
|
8791
8815
|
},
|
|
8792
8816
|
/* @__PURE__ */ React36.createElement("svg", { className: "w-6 h-6", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24" }, /* @__PURE__ */ React36.createElement("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M4 6h16M4 12h16M4 18h16" }))
|
|
8793
|
-
), /* @__PURE__ */ React36.createElement(Link6, { href: ((
|
|
8817
|
+
), /* @__PURE__ */ React36.createElement(Link6, { href: ((_q = props == null ? void 0 : props.logo) == null ? void 0 : _q.href) || "/", className: "flex items-center" }, logoUrl ? /* @__PURE__ */ React36.createElement(
|
|
8794
8818
|
Image11,
|
|
8795
8819
|
{
|
|
8796
8820
|
src: logoUrl,
|
|
@@ -8844,7 +8868,7 @@ function HeaderNavigation2({
|
|
|
8844
8868
|
viewAllLabel,
|
|
8845
8869
|
" \u2192"
|
|
8846
8870
|
))));
|
|
8847
|
-
}))), /* @__PURE__ */ React36.createElement("div", { className: "border-t border-secondary px-4 py-6" }, /* @__PURE__ */ React36.createElement("div", { className: "flex flex-col gap-3" }, ((
|
|
8871
|
+
}))), /* @__PURE__ */ React36.createElement("div", { className: "border-t border-secondary px-4 py-6" }, /* @__PURE__ */ React36.createElement("div", { className: "flex flex-col gap-3" }, ((_r = props == null ? void 0 : props.cta_button) == null ? void 0 : _r.secondary_label) && ctaUrls.hasSecondary && /* @__PURE__ */ React36.createElement(
|
|
8848
8872
|
Button2,
|
|
8849
8873
|
{
|
|
8850
8874
|
href: ctaUrls.secondaryHref,
|
|
@@ -8859,14 +8883,14 @@ function HeaderNavigation2({
|
|
|
8859
8883
|
Button2,
|
|
8860
8884
|
{
|
|
8861
8885
|
href: ctaUrls.primaryHref,
|
|
8862
|
-
target: (
|
|
8863
|
-
rel: ((
|
|
8886
|
+
target: (_t = (_s = props == null ? void 0 : props.cta_button) == null ? void 0 : _s.target) != null ? _t : isExternalCtaUrl(ctaUrls.primaryHref) ? "_blank" : void 0,
|
|
8887
|
+
rel: ((_u = props == null ? void 0 : props.cta_button) == null ? void 0 : _u.target) === "_blank" || isExternalCtaUrl(ctaUrls.primaryHref) ? "noopener noreferrer" : void 0,
|
|
8864
8888
|
color: "primary",
|
|
8865
8889
|
className: "w-full font-body text-sm uppercase tracking-wide py-3 rounded-sm",
|
|
8866
8890
|
onClick: () => setIsMobileMenuOpen(false)
|
|
8867
8891
|
},
|
|
8868
|
-
((
|
|
8869
|
-
))))), !isPortalPage && /* @__PURE__ */ React36.createElement("div", { className: "fixed bottom-0 left-0 right-0 z-40 md:hidden bg-fg-primary" }, /* @__PURE__ */ React36.createElement("div", { className: "flex gap-0" }, ((
|
|
8892
|
+
((_v = props == null ? void 0 : props.cta_button) == null ? void 0 : _v.secondary_label) && ctaUrls.hasSecondary ? props.cta_button.secondary_label : ((_w = props == null ? void 0 : props.cta_button) == null ? void 0 : _w.label) || "Contact"
|
|
8893
|
+
))))), !isPortalPage && /* @__PURE__ */ React36.createElement("div", { className: "fixed bottom-0 left-0 right-0 z-40 md:hidden bg-fg-primary" }, /* @__PURE__ */ React36.createElement("div", { className: "flex gap-0" }, ((_x = props == null ? void 0 : props.cta_button) == null ? void 0 : _x.secondary_label) && ctaUrls.hasSecondary && /* @__PURE__ */ React36.createElement(
|
|
8870
8894
|
Button2,
|
|
8871
8895
|
{
|
|
8872
8896
|
href: ctaUrls.secondaryHref,
|
|
@@ -8880,12 +8904,12 @@ function HeaderNavigation2({
|
|
|
8880
8904
|
Button2,
|
|
8881
8905
|
{
|
|
8882
8906
|
href: ctaUrls.primaryHref,
|
|
8883
|
-
target: (
|
|
8884
|
-
rel: ((
|
|
8907
|
+
target: (_z = (_y = props == null ? void 0 : props.cta_button) == null ? void 0 : _y.target) != null ? _z : isExternalCtaUrl(ctaUrls.primaryHref) ? "_blank" : void 0,
|
|
8908
|
+
rel: ((_A = props == null ? void 0 : props.cta_button) == null ? void 0 : _A.target) === "_blank" || isExternalCtaUrl(ctaUrls.primaryHref) ? "noopener noreferrer" : void 0,
|
|
8885
8909
|
color: "primary",
|
|
8886
|
-
className: `${((
|
|
8910
|
+
className: `${((_B = props == null ? void 0 : props.cta_button) == null ? void 0 : _B.secondary_label) && ctaUrls.hasSecondary ? "flex-1" : "w-full"} font-body text-sm uppercase tracking-wide py-4 rounded-none`
|
|
8887
8911
|
},
|
|
8888
|
-
((
|
|
8912
|
+
((_C = props == null ? void 0 : props.cta_button) == null ? void 0 : _C.secondary_label) && ctaUrls.hasSecondary ? props.cta_button.secondary_label : ((_D = props == null ? void 0 : props.cta_button) == null ? void 0 : _D.label) || "Contact"
|
|
8889
8913
|
))));
|
|
8890
8914
|
}
|
|
8891
8915
|
registerThemeVariant("header-navigation", "aman", HeaderNavigation2);
|
|
@@ -9116,14 +9140,18 @@ var ContactSectionForm2 = ({
|
|
|
9116
9140
|
onSuccess == null ? void 0 : onSuccess();
|
|
9117
9141
|
await setPixelUserData({ email: data.email, phone: data.phone });
|
|
9118
9142
|
firePixelEvent("Lead", void 0, result.eventId);
|
|
9143
|
+
captureEvent("form_submitted", __spreadValues({ form_type: "lead" }, result.eventId && { event_id: result.eventId }));
|
|
9119
9144
|
setTimeout(() => setSubmitStatus("idle"), 5e3);
|
|
9120
9145
|
} else {
|
|
9146
|
+
const errorMsg = result.error || "Something went wrong. Please try again.";
|
|
9121
9147
|
setSubmitStatus("error");
|
|
9122
|
-
setStatusMessage(
|
|
9148
|
+
setStatusMessage(errorMsg);
|
|
9149
|
+
captureEvent("form_failed", { form_type: "lead", error: errorMsg });
|
|
9123
9150
|
}
|
|
9124
9151
|
} catch (e2) {
|
|
9125
9152
|
setSubmitStatus("error");
|
|
9126
9153
|
setStatusMessage("Network error. Please try again later.");
|
|
9154
|
+
captureEvent("form_failed", { form_type: "lead", error: "network_error" });
|
|
9127
9155
|
}
|
|
9128
9156
|
setIsSubmitting(false);
|
|
9129
9157
|
};
|
|
@@ -17717,7 +17745,7 @@ function HeaderNavigation3({
|
|
|
17717
17745
|
companyInformation,
|
|
17718
17746
|
websitePhotos
|
|
17719
17747
|
}) {
|
|
17720
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t;
|
|
17748
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y;
|
|
17721
17749
|
const [activeDropdown, setActiveDropdown] = useState23(null);
|
|
17722
17750
|
const [isMobileMenuOpen, setIsMobileMenuOpen] = useState23(false);
|
|
17723
17751
|
const closeTimeoutRef = useRef14(null);
|
|
@@ -17731,7 +17759,12 @@ function HeaderNavigation3({
|
|
|
17731
17759
|
const logoUrl = logoImageOverride || getLogoUrl(websitePhotos) || ((_a = props == null ? void 0 : props.logo) == null ? void 0 : _a.image);
|
|
17732
17760
|
const companyName = logoTextOverride || (companyInformation == null ? void 0 : companyInformation.company_name) || ((_b = props == null ? void 0 : props.logo) == null ? void 0 : _b.text) || "";
|
|
17733
17761
|
const navigation = navigationOverride || ((_c = config == null ? void 0 : config.navigation) == null ? void 0 : _c.header) || [];
|
|
17734
|
-
const
|
|
17762
|
+
const resolvedCtaUrls = resolveCtaUrls(companyInformation);
|
|
17763
|
+
const ctaUrls = {
|
|
17764
|
+
primaryHref: (_e = (_d = props == null ? void 0 : props.cta_button) == null ? void 0 : _d.secondary_href) != null ? _e : resolvedCtaUrls.primaryHref,
|
|
17765
|
+
secondaryHref: (_g = (_f = props == null ? void 0 : props.cta_button) == null ? void 0 : _f.href) != null ? _g : resolvedCtaUrls.secondaryHref,
|
|
17766
|
+
hasSecondary: ((_h = props == null ? void 0 : props.cta_button) == null ? void 0 : _h.secondary_href) != null || resolvedCtaUrls.hasSecondary
|
|
17767
|
+
};
|
|
17735
17768
|
const pathname = usePathname3();
|
|
17736
17769
|
const portalPath = resolvePortalPath(companyInformation);
|
|
17737
17770
|
const isPortalPage = portalPath ? pathname == null ? void 0 : pathname.startsWith(portalPath) : false;
|
|
@@ -17779,7 +17812,7 @@ function HeaderNavigation3({
|
|
|
17779
17812
|
viewAllLabel: ""
|
|
17780
17813
|
};
|
|
17781
17814
|
};
|
|
17782
|
-
return /* @__PURE__ */ React45.createElement(React45.Fragment, null, /* @__PURE__ */ React45.createElement("header", { className: "hidden md:block sticky top-0 z-50 bg-primary border-b border-primary" }, /* @__PURE__ */ React45.createElement("div", { className: "mx-auto max-w-7xl px-4 md:px-8" }, /* @__PURE__ */ React45.createElement("div", { className: "flex items-center justify-between py-4" }, /* @__PURE__ */ React45.createElement(Link8, { href: ((
|
|
17815
|
+
return /* @__PURE__ */ React45.createElement(React45.Fragment, null, /* @__PURE__ */ React45.createElement("header", { className: "hidden md:block sticky top-0 z-50 bg-primary border-b border-primary" }, /* @__PURE__ */ React45.createElement("div", { className: "mx-auto max-w-7xl px-4 md:px-8" }, /* @__PURE__ */ React45.createElement("div", { className: "flex items-center justify-between py-4" }, /* @__PURE__ */ React45.createElement(Link8, { href: ((_i = props == null ? void 0 : props.logo) == null ? void 0 : _i.href) || "/", className: "flex items-center flex-shrink-0" }, logoUrl ? /* @__PURE__ */ React45.createElement(
|
|
17783
17816
|
Image12,
|
|
17784
17817
|
{
|
|
17785
17818
|
src: logoUrl,
|
|
@@ -17833,7 +17866,7 @@ function HeaderNavigation3({
|
|
|
17833
17866
|
));
|
|
17834
17867
|
})()
|
|
17835
17868
|
)
|
|
17836
|
-
))), /* @__PURE__ */ React45.createElement("div", { className: "flex items-center gap-3 flex-shrink-0 ml-4" }, ((
|
|
17869
|
+
))), /* @__PURE__ */ React45.createElement("div", { className: "flex items-center gap-3 flex-shrink-0 ml-4" }, ((_j = props == null ? void 0 : props.cta_button) == null ? void 0 : _j.secondary_label) && ctaUrls.hasSecondary && /* @__PURE__ */ React45.createElement(
|
|
17837
17870
|
Button2,
|
|
17838
17871
|
{
|
|
17839
17872
|
href: ctaUrls.secondaryHref,
|
|
@@ -17847,12 +17880,12 @@ function HeaderNavigation3({
|
|
|
17847
17880
|
Button2,
|
|
17848
17881
|
{
|
|
17849
17882
|
href: ctaUrls.primaryHref,
|
|
17850
|
-
target: (
|
|
17851
|
-
rel: ((
|
|
17883
|
+
target: (_l = (_k = props == null ? void 0 : props.cta_button) == null ? void 0 : _k.target) != null ? _l : isExternalCtaUrl(ctaUrls.primaryHref) ? "_blank" : void 0,
|
|
17884
|
+
rel: ((_m = props == null ? void 0 : props.cta_button) == null ? void 0 : _m.target) === "_blank" || isExternalCtaUrl(ctaUrls.primaryHref) ? "noopener noreferrer" : void 0,
|
|
17852
17885
|
color: "primary",
|
|
17853
17886
|
size: "sm"
|
|
17854
17887
|
},
|
|
17855
|
-
((
|
|
17888
|
+
((_n = props == null ? void 0 : props.cta_button) == null ? void 0 : _n.secondary_label) && ctaUrls.hasSecondary ? props.cta_button.secondary_label : ((_o = props == null ? void 0 : props.cta_button) == null ? void 0 : _o.label) || ""
|
|
17856
17889
|
))))), /* @__PURE__ */ React45.createElement("header", { className: "md:hidden sticky top-0 z-50 bg-primary border-b border-secondary" }, /* @__PURE__ */ React45.createElement("div", { className: "flex items-center justify-between px-4 py-4" }, /* @__PURE__ */ React45.createElement(
|
|
17857
17890
|
"button",
|
|
17858
17891
|
{
|
|
@@ -17861,7 +17894,7 @@ function HeaderNavigation3({
|
|
|
17861
17894
|
"aria-label": "Open menu"
|
|
17862
17895
|
},
|
|
17863
17896
|
/* @__PURE__ */ React45.createElement("svg", { className: "w-6 h-6", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24" }, /* @__PURE__ */ React45.createElement("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M4 6h16M4 12h16M4 18h16" }))
|
|
17864
|
-
), /* @__PURE__ */ React45.createElement(Link8, { href: ((
|
|
17897
|
+
), /* @__PURE__ */ React45.createElement(Link8, { href: ((_p = props == null ? void 0 : props.logo) == null ? void 0 : _p.href) || "/", className: "flex items-center" }, logoUrl ? /* @__PURE__ */ React45.createElement(
|
|
17865
17898
|
Image12,
|
|
17866
17899
|
{
|
|
17867
17900
|
src: logoUrl,
|
|
@@ -17906,7 +17939,7 @@ function HeaderNavigation3({
|
|
|
17906
17939
|
},
|
|
17907
17940
|
link.label
|
|
17908
17941
|
)))));
|
|
17909
|
-
}))), /* @__PURE__ */ React45.createElement("div", { className: "border-t border-secondary px-4 py-6" }, /* @__PURE__ */ React45.createElement("div", { className: "flex flex-col gap-3" }, ((
|
|
17942
|
+
}))), /* @__PURE__ */ React45.createElement("div", { className: "border-t border-secondary px-4 py-6" }, /* @__PURE__ */ React45.createElement("div", { className: "flex flex-col gap-3" }, ((_q = props == null ? void 0 : props.cta_button) == null ? void 0 : _q.secondary_label) && ctaUrls.hasSecondary && /* @__PURE__ */ React45.createElement(
|
|
17910
17943
|
Button2,
|
|
17911
17944
|
{
|
|
17912
17945
|
href: ctaUrls.secondaryHref,
|
|
@@ -17925,8 +17958,8 @@ function HeaderNavigation3({
|
|
|
17925
17958
|
className: "w-full",
|
|
17926
17959
|
onClick: () => setIsMobileMenuOpen(false)
|
|
17927
17960
|
},
|
|
17928
|
-
((
|
|
17929
|
-
))))), !isPortalPage && /* @__PURE__ */ React45.createElement("div", { className: "fixed bottom-0 left-0 right-0 z-40 md:hidden bg-fg-primary" }, /* @__PURE__ */ React45.createElement("div", { className: "flex gap-0" }, ((
|
|
17961
|
+
((_r = props == null ? void 0 : props.cta_button) == null ? void 0 : _r.label) || ""
|
|
17962
|
+
))))), !isPortalPage && /* @__PURE__ */ React45.createElement("div", { className: "fixed bottom-0 left-0 right-0 z-40 md:hidden bg-fg-primary" }, /* @__PURE__ */ React45.createElement("div", { className: "flex gap-0" }, ((_s = props == null ? void 0 : props.cta_button) == null ? void 0 : _s.secondary_label) && ctaUrls.hasSecondary && /* @__PURE__ */ React45.createElement(
|
|
17930
17963
|
Button2,
|
|
17931
17964
|
{
|
|
17932
17965
|
href: ctaUrls.secondaryHref,
|
|
@@ -17940,12 +17973,12 @@ function HeaderNavigation3({
|
|
|
17940
17973
|
Button2,
|
|
17941
17974
|
{
|
|
17942
17975
|
href: ctaUrls.primaryHref,
|
|
17943
|
-
target: (
|
|
17944
|
-
rel: ((
|
|
17976
|
+
target: (_u = (_t = props == null ? void 0 : props.cta_button) == null ? void 0 : _t.target) != null ? _u : isExternalCtaUrl(ctaUrls.primaryHref) ? "_blank" : void 0,
|
|
17977
|
+
rel: ((_v = props == null ? void 0 : props.cta_button) == null ? void 0 : _v.target) === "_blank" || isExternalCtaUrl(ctaUrls.primaryHref) ? "noopener noreferrer" : void 0,
|
|
17945
17978
|
color: "primary",
|
|
17946
|
-
className: `${((
|
|
17979
|
+
className: `${((_w = props == null ? void 0 : props.cta_button) == null ? void 0 : _w.secondary_label) && ctaUrls.hasSecondary ? "flex-1" : "w-full"} font-body text-sm uppercase tracking-wide py-4 rounded-none`
|
|
17947
17980
|
},
|
|
17948
|
-
((
|
|
17981
|
+
((_x = props == null ? void 0 : props.cta_button) == null ? void 0 : _x.secondary_label) && ctaUrls.hasSecondary ? props.cta_button.secondary_label : ((_y = props == null ? void 0 : props.cta_button) == null ? void 0 : _y.label) || "Contact"
|
|
17949
17982
|
))));
|
|
17950
17983
|
}
|
|
17951
17984
|
registerThemeVariant("header-navigation", "barelux", HeaderNavigation3);
|
|
@@ -18322,14 +18355,18 @@ var ContactSectionForm3 = ({
|
|
|
18322
18355
|
onSuccess == null ? void 0 : onSuccess();
|
|
18323
18356
|
await setPixelUserData({ email: data.email, phone: data.phone });
|
|
18324
18357
|
firePixelEvent("Lead", void 0, result.eventId);
|
|
18358
|
+
captureEvent("form_submitted", __spreadValues({ form_type: "lead" }, result.eventId && { event_id: result.eventId }));
|
|
18325
18359
|
setTimeout(() => setSubmitStatus("idle"), 5e3);
|
|
18326
18360
|
} else {
|
|
18361
|
+
const errorMsg = result.error || "Something went wrong. Please try again.";
|
|
18327
18362
|
setSubmitStatus("error");
|
|
18328
|
-
setStatusMessage(
|
|
18363
|
+
setStatusMessage(errorMsg);
|
|
18364
|
+
captureEvent("form_failed", { form_type: "lead", error: errorMsg });
|
|
18329
18365
|
}
|
|
18330
18366
|
} catch (e2) {
|
|
18331
18367
|
setSubmitStatus("error");
|
|
18332
18368
|
setStatusMessage("Network error. Please try again later.");
|
|
18369
|
+
captureEvent("form_failed", { form_type: "lead", error: "network_error" });
|
|
18333
18370
|
}
|
|
18334
18371
|
setIsSubmitting(false);
|
|
18335
18372
|
};
|
|
@@ -18511,7 +18548,7 @@ function HeaderNavigation4({
|
|
|
18511
18548
|
companyInformation,
|
|
18512
18549
|
websitePhotos
|
|
18513
18550
|
}) {
|
|
18514
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t;
|
|
18551
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y;
|
|
18515
18552
|
const [activeDropdown, setActiveDropdown] = useState27(null);
|
|
18516
18553
|
const [isMobileMenuOpen, setIsMobileMenuOpen] = useState27(false);
|
|
18517
18554
|
const closeTimeoutRef = useRef16(null);
|
|
@@ -18525,7 +18562,12 @@ function HeaderNavigation4({
|
|
|
18525
18562
|
const logoUrl = logoImageOverride || getLogoUrl(websitePhotos) || ((_a = props == null ? void 0 : props.logo) == null ? void 0 : _a.image);
|
|
18526
18563
|
const companyName = logoTextOverride || (companyInformation == null ? void 0 : companyInformation.company_name) || ((_b = props == null ? void 0 : props.logo) == null ? void 0 : _b.text) || "";
|
|
18527
18564
|
const navigation = navigationOverride || ((_c = config == null ? void 0 : config.navigation) == null ? void 0 : _c.header) || [];
|
|
18528
|
-
const
|
|
18565
|
+
const resolvedCtaUrls = resolveCtaUrls(companyInformation);
|
|
18566
|
+
const ctaUrls = {
|
|
18567
|
+
primaryHref: (_e = (_d = props == null ? void 0 : props.cta_button) == null ? void 0 : _d.secondary_href) != null ? _e : resolvedCtaUrls.primaryHref,
|
|
18568
|
+
secondaryHref: (_g = (_f = props == null ? void 0 : props.cta_button) == null ? void 0 : _f.href) != null ? _g : resolvedCtaUrls.secondaryHref,
|
|
18569
|
+
hasSecondary: ((_h = props == null ? void 0 : props.cta_button) == null ? void 0 : _h.secondary_href) != null || resolvedCtaUrls.hasSecondary
|
|
18570
|
+
};
|
|
18529
18571
|
const pathname = usePathname4();
|
|
18530
18572
|
const portalPath = resolvePortalPath(companyInformation);
|
|
18531
18573
|
const isPortalPage = portalPath ? pathname == null ? void 0 : pathname.startsWith(portalPath) : false;
|
|
@@ -18555,7 +18597,7 @@ function HeaderNavigation4({
|
|
|
18555
18597
|
const handleDropdownMouseLeave = useCallback9(() => {
|
|
18556
18598
|
handleMouseLeave();
|
|
18557
18599
|
}, [handleMouseLeave]);
|
|
18558
|
-
return /* @__PURE__ */ React53.createElement(React53.Fragment, null, /* @__PURE__ */ React53.createElement("header", { className: "hidden md:block sticky top-0 z-50 bg-primary", style: { borderBottom: "3px solid rgb(217, 191, 168)" } }, /* @__PURE__ */ React53.createElement("div", { className: "mx-auto max-w-container px-4 md:px-8" }, /* @__PURE__ */ React53.createElement("div", { className: "relative flex items-center justify-between py-5" }, /* @__PURE__ */ React53.createElement(Link10, { href: ((
|
|
18600
|
+
return /* @__PURE__ */ React53.createElement(React53.Fragment, null, /* @__PURE__ */ React53.createElement("header", { className: "hidden md:block sticky top-0 z-50 bg-primary", style: { borderBottom: "3px solid rgb(217, 191, 168)" } }, /* @__PURE__ */ React53.createElement("div", { className: "mx-auto max-w-container px-4 md:px-8" }, /* @__PURE__ */ React53.createElement("div", { className: "relative flex items-center justify-between py-5" }, /* @__PURE__ */ React53.createElement(Link10, { href: ((_i = props == null ? void 0 : props.logo) == null ? void 0 : _i.href) || "/", className: "flex items-center z-10" }, logoUrl ? /* @__PURE__ */ React53.createElement(
|
|
18559
18601
|
Image13,
|
|
18560
18602
|
{
|
|
18561
18603
|
src: logoUrl,
|
|
@@ -18599,7 +18641,7 @@ function HeaderNavigation4({
|
|
|
18599
18641
|
child.label
|
|
18600
18642
|
)))
|
|
18601
18643
|
)
|
|
18602
|
-
))), /* @__PURE__ */ React53.createElement("div", { className: "flex items-center gap-3 flex-shrink-0 z-10" }, ((
|
|
18644
|
+
))), /* @__PURE__ */ React53.createElement("div", { className: "flex items-center gap-3 flex-shrink-0 z-10" }, ((_j = props == null ? void 0 : props.cta_button) == null ? void 0 : _j.secondary_label) && ctaUrls.hasSecondary && /* @__PURE__ */ React53.createElement(
|
|
18603
18645
|
Button2,
|
|
18604
18646
|
{
|
|
18605
18647
|
href: ctaUrls.secondaryHref,
|
|
@@ -18613,12 +18655,12 @@ function HeaderNavigation4({
|
|
|
18613
18655
|
Button2,
|
|
18614
18656
|
{
|
|
18615
18657
|
href: ctaUrls.primaryHref,
|
|
18616
|
-
target: (
|
|
18617
|
-
rel: ((
|
|
18658
|
+
target: (_l = (_k = props == null ? void 0 : props.cta_button) == null ? void 0 : _k.target) != null ? _l : isExternalCtaUrl(ctaUrls.primaryHref) ? "_blank" : void 0,
|
|
18659
|
+
rel: ((_m = props == null ? void 0 : props.cta_button) == null ? void 0 : _m.target) === "_blank" || isExternalCtaUrl(ctaUrls.primaryHref) ? "noopener noreferrer" : void 0,
|
|
18618
18660
|
color: "primary",
|
|
18619
18661
|
size: "sm"
|
|
18620
18662
|
},
|
|
18621
|
-
((
|
|
18663
|
+
((_n = props == null ? void 0 : props.cta_button) == null ? void 0 : _n.secondary_label) && ctaUrls.hasSecondary ? props.cta_button.secondary_label : ((_o = props == null ? void 0 : props.cta_button) == null ? void 0 : _o.label) || ""
|
|
18622
18664
|
))))), /* @__PURE__ */ React53.createElement("header", { className: "md:hidden sticky top-0 z-50 bg-primary", style: { borderBottom: "3px solid rgb(217, 191, 168)" } }, /* @__PURE__ */ React53.createElement("div", { className: "flex items-center justify-between px-4 py-4" }, /* @__PURE__ */ React53.createElement(
|
|
18623
18665
|
"button",
|
|
18624
18666
|
{
|
|
@@ -18627,7 +18669,7 @@ function HeaderNavigation4({
|
|
|
18627
18669
|
"aria-label": "Open menu"
|
|
18628
18670
|
},
|
|
18629
18671
|
/* @__PURE__ */ React53.createElement("svg", { className: "w-6 h-6", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24" }, /* @__PURE__ */ React53.createElement("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M4 6h16M4 12h16M4 18h16" }))
|
|
18630
|
-
), /* @__PURE__ */ React53.createElement(Link10, { href: ((
|
|
18672
|
+
), /* @__PURE__ */ React53.createElement(Link10, { href: ((_p = props == null ? void 0 : props.logo) == null ? void 0 : _p.href) || "/", className: "flex items-center" }, logoUrl ? /* @__PURE__ */ React53.createElement(
|
|
18631
18673
|
Image13,
|
|
18632
18674
|
{
|
|
18633
18675
|
src: logoUrl,
|
|
@@ -18670,7 +18712,7 @@ function HeaderNavigation4({
|
|
|
18670
18712
|
onClick: () => setIsMobileMenuOpen(false)
|
|
18671
18713
|
},
|
|
18672
18714
|
child.label
|
|
18673
|
-
)))))))), /* @__PURE__ */ React53.createElement("div", { className: "px-4 py-6", style: { borderTop: "1px solid rgb(217, 191, 168)" } }, /* @__PURE__ */ React53.createElement("div", { className: "flex flex-col gap-3" }, ((
|
|
18715
|
+
)))))))), /* @__PURE__ */ React53.createElement("div", { className: "px-4 py-6", style: { borderTop: "1px solid rgb(217, 191, 168)" } }, /* @__PURE__ */ React53.createElement("div", { className: "flex flex-col gap-3" }, ((_q = props == null ? void 0 : props.cta_button) == null ? void 0 : _q.secondary_label) && ctaUrls.hasSecondary && /* @__PURE__ */ React53.createElement(
|
|
18674
18716
|
Button2,
|
|
18675
18717
|
{
|
|
18676
18718
|
href: ctaUrls.secondaryHref,
|
|
@@ -18689,8 +18731,8 @@ function HeaderNavigation4({
|
|
|
18689
18731
|
className: "w-full",
|
|
18690
18732
|
onClick: () => setIsMobileMenuOpen(false)
|
|
18691
18733
|
},
|
|
18692
|
-
((
|
|
18693
|
-
))))), !isPortalPage && /* @__PURE__ */ React53.createElement("div", { className: "fixed bottom-0 left-0 right-0 z-40 md:hidden", style: { backgroundColor: "rgb(148, 133, 84)" } }, /* @__PURE__ */ React53.createElement("div", { className: "flex gap-0" }, ((
|
|
18734
|
+
((_r = props == null ? void 0 : props.cta_button) == null ? void 0 : _r.label) || ""
|
|
18735
|
+
))))), !isPortalPage && /* @__PURE__ */ React53.createElement("div", { className: "fixed bottom-0 left-0 right-0 z-40 md:hidden", style: { backgroundColor: "rgb(148, 133, 84)" } }, /* @__PURE__ */ React53.createElement("div", { className: "flex gap-0" }, ((_s = props == null ? void 0 : props.cta_button) == null ? void 0 : _s.secondary_label) && ctaUrls.hasSecondary && /* @__PURE__ */ React53.createElement(
|
|
18694
18736
|
Button2,
|
|
18695
18737
|
{
|
|
18696
18738
|
href: ctaUrls.secondaryHref,
|
|
@@ -18705,12 +18747,12 @@ function HeaderNavigation4({
|
|
|
18705
18747
|
Button2,
|
|
18706
18748
|
{
|
|
18707
18749
|
href: ctaUrls.primaryHref,
|
|
18708
|
-
target: (
|
|
18709
|
-
rel: ((
|
|
18750
|
+
target: (_u = (_t = props == null ? void 0 : props.cta_button) == null ? void 0 : _t.target) != null ? _u : isExternalCtaUrl(ctaUrls.primaryHref) ? "_blank" : void 0,
|
|
18751
|
+
rel: ((_v = props == null ? void 0 : props.cta_button) == null ? void 0 : _v.target) === "_blank" || isExternalCtaUrl(ctaUrls.primaryHref) ? "noopener noreferrer" : void 0,
|
|
18710
18752
|
color: "primary",
|
|
18711
|
-
className: `${((
|
|
18753
|
+
className: `${((_w = props == null ? void 0 : props.cta_button) == null ? void 0 : _w.secondary_label) && ctaUrls.hasSecondary ? "flex-1" : "w-full"} font-body text-sm uppercase tracking-wide py-4 rounded-none`
|
|
18712
18754
|
},
|
|
18713
|
-
((
|
|
18755
|
+
((_x = props == null ? void 0 : props.cta_button) == null ? void 0 : _x.secondary_label) && ctaUrls.hasSecondary ? props.cta_button.secondary_label : ((_y = props == null ? void 0 : props.cta_button) == null ? void 0 : _y.label) || "Contact"
|
|
18714
18756
|
))));
|
|
18715
18757
|
}
|
|
18716
18758
|
registerThemeVariant("header-navigation", "balance", HeaderNavigation4);
|
|
@@ -18820,14 +18862,18 @@ var ContactSectionForm4 = ({
|
|
|
18820
18862
|
onSuccess == null ? void 0 : onSuccess();
|
|
18821
18863
|
await setPixelUserData({ email: data.email, phone: data.phone });
|
|
18822
18864
|
firePixelEvent("Lead", void 0, result.eventId);
|
|
18865
|
+
captureEvent("form_submitted", __spreadValues({ form_type: "lead" }, result.eventId && { event_id: result.eventId }));
|
|
18823
18866
|
setTimeout(() => setSubmitStatus("idle"), 5e3);
|
|
18824
18867
|
} else {
|
|
18868
|
+
const errorMsg = result.error || "Something went wrong. Please try again.";
|
|
18825
18869
|
setSubmitStatus("error");
|
|
18826
|
-
setStatusMessage(
|
|
18870
|
+
setStatusMessage(errorMsg);
|
|
18871
|
+
captureEvent("form_failed", { form_type: "lead", error: errorMsg });
|
|
18827
18872
|
}
|
|
18828
18873
|
} catch (e2) {
|
|
18829
18874
|
setSubmitStatus("error");
|
|
18830
18875
|
setStatusMessage("Network error. Please try again later.");
|
|
18876
|
+
captureEvent("form_failed", { form_type: "lead", error: "network_error" });
|
|
18831
18877
|
}
|
|
18832
18878
|
setIsSubmitting(false);
|
|
18833
18879
|
};
|
|
@@ -19282,14 +19328,18 @@ var EmailSignupSection = ({
|
|
|
19282
19328
|
setSubmitStatus("success");
|
|
19283
19329
|
setStatusMessage(result.message || successMessage);
|
|
19284
19330
|
(_a = formRef.current) == null ? void 0 : _a.reset();
|
|
19331
|
+
captureEvent("form_submitted", { form_type: "marketing_list_signup" });
|
|
19285
19332
|
setTimeout(() => setSubmitStatus("idle"), 6e3);
|
|
19286
19333
|
} else {
|
|
19334
|
+
const errorMsg = result.error || "Something went wrong. Please try again.";
|
|
19287
19335
|
setSubmitStatus("error");
|
|
19288
|
-
setStatusMessage(
|
|
19336
|
+
setStatusMessage(errorMsg);
|
|
19337
|
+
captureEvent("form_failed", { form_type: "marketing_list_signup", error: errorMsg });
|
|
19289
19338
|
}
|
|
19290
19339
|
} catch (e2) {
|
|
19291
19340
|
setSubmitStatus("error");
|
|
19292
19341
|
setStatusMessage("Network error. Please try again later.");
|
|
19342
|
+
captureEvent("form_failed", { form_type: "marketing_list_signup", error: "network_error" });
|
|
19293
19343
|
}
|
|
19294
19344
|
setIsSubmitting(false);
|
|
19295
19345
|
};
|