@nuskin/nextgen-header 1.31.0 → 1.32.0

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.
@@ -100850,7 +100850,7 @@ const utils_namespaceObject = require("@contentstack/utils");
100850
100850
  var HEADER_CONTENT_ENTRY_UID = "global_header";
100851
100851
  var HEADER_ENTRY_URL = "/vb-header/root-header";
100852
100852
  var VB_EMPTY_BLOCK_PARENT_CLASS = "visual-builder__empty-block-parent";
100853
- var referenceFields = (/* unused pure expression or super */ null && (["top_navigation", "top_navigation.menu_items.menu_item", "top_navigation.menu_items.menu_item.sub_categories.category_section.items.product_category.category", "market_selector.regions.markets.languages", "utility_links", "utility_links.loyalty_menu", "utility_links.sign_up_sign_in_component", "product_search", "translations"]));
100853
+ var referenceFields = (/* unused pure expression or super */ null && (["top_ribbon", "top_navigation", "top_navigation.menu_items.menu_item", "top_navigation.menu_items.menu_item.sub_categories.category_section.items.product_category.category", "market_selector.regions.markets.languages", "utility_links", "utility_links.loyalty_menu", "utility_links.sign_up_sign_in_component", "product_search", "translations"]));
100854
100854
  var CONTENTSTACK_API_KEY = process.env.CONTENTSTACK_API_KEY;
100855
100855
  var CONTENTSTACK_DELIVERY_TOKEN = process.env.CONTENTSTACK_DELIVERY_TOKEN;
100856
100856
  var CONTENTSTACK_ENVIRONMENT = process.env.CONTENTSTACK_ENVIRONMENT;
@@ -107749,43 +107749,179 @@ HeaderNavigationRegion.propTypes = {
107749
107749
  translations: (external_prop_types_default()).object
107750
107750
  };
107751
107751
  ;// ./src/utils/common.js
107752
- /**
107753
- * Validate and sanitize a URL string.
107754
- * Returns '#' for invalid/empty values to provide safe fallback anchors.
107755
- *
107756
- * SSR-safe: no DOM/window access.
107757
- *
107758
- * @param {*} url - The URL value to validate
107759
- * @returns {string} The original URL if valid, otherwise '#'
107760
- */
107761
- var validateUrl = function validateUrl(url) {
107762
- if (!url || typeof url !== 'string' || url.trim() === '') {
107763
- return '#';
107752
+ function common_slicedToArray(r, e) { return common_arrayWithHoles(r) || common_iterableToArrayLimit(r, e) || common_unsupportedIterableToArray(r, e) || common_nonIterableRest(); }
107753
+ function common_nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
107754
+ function common_unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return common_arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? common_arrayLikeToArray(r, a) : void 0; } }
107755
+ function common_arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
107756
+ function common_iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
107757
+ function common_arrayWithHoles(r) { if (Array.isArray(r)) return r; }
107758
+ var isServer = typeof window === "undefined";
107759
+ var hasLocalePrefix = function hasLocalePrefix(path) {
107760
+ return /^\/[a-z]{2}\/[a-z]{2}(\/|$)/i.test(path);
107761
+ };
107762
+ var isProtocolRelativeUrl = function isProtocolRelativeUrl(value) {
107763
+ return /^\/\/[^/]/.test(value);
107764
+ };
107765
+ var isAbsoluteHttpUrl = function isAbsoluteHttpUrl(value) {
107766
+ return /^https?:\/\//i.test(value);
107767
+ };
107768
+ var isPlainDomain = function isPlainDomain(value) {
107769
+ return /^(?:www\.)?[a-z0-9-]+\.[a-z]{2,}(\/.*)?$/i.test(value) && !value.startsWith("/");
107770
+ };
107771
+ function replaceLocalePlaceholders(value, country, language) {
107772
+ return value.replaceAll(/\{%\s*region\s*}/gi, country).replaceAll(/\{%\s*language\s*}/gi, language).replaceAll(/%7B%\s*region\s*%7D/gi, country).replaceAll(/%7B%\s*language\s*%7D/gi, language);
107773
+ }
107774
+ function buildNuSkinUrl(params) {
107775
+ var url = params.url,
107776
+ current = params.current,
107777
+ localizedBase = params.localizedBase,
107778
+ country = params.country,
107779
+ language = params.language;
107780
+ var normalizedOrigin = "".concat(current.protocol, "//").concat(current.host);
107781
+ var pathname = replaceLocalePlaceholders(url.pathname, country, language);
107782
+ if (hasLocalePrefix(pathname)) {
107783
+ return "".concat(normalizedOrigin).concat(pathname).concat(url.search).concat(url.hash);
107784
+ }
107785
+ return "".concat(localizedBase).concat(pathname).concat(url.search).concat(url.hash);
107786
+ }
107787
+ function needsLocaleRewrite(url) {
107788
+ var isMainWebsiteHost = url.host === "nuskin.com" || url.host === "www.nuskin.com";
107789
+ var hasPlaceholders = /\{%\s*(region|language)\s*\}/i.test(url.pathname);
107790
+ return isMainWebsiteHost || hasLocalePrefix(url.pathname) || hasPlaceholders;
107791
+ }
107792
+ function resolveNuSkinUrl(params) {
107793
+ var url = params.url,
107794
+ fallback = params.fallback,
107795
+ current = params.current,
107796
+ localizedBase = params.localizedBase,
107797
+ country = params.country,
107798
+ language = params.language;
107799
+ return needsLocaleRewrite(url) ? buildNuSkinUrl({
107800
+ url: url,
107801
+ current: current,
107802
+ localizedBase: localizedBase,
107803
+ country: country,
107804
+ language: language
107805
+ }) : fallback;
107806
+ }
107807
+ function resolveExternalOrAbsoluteUrl(params) {
107808
+ var trimmedUrl = params.trimmedUrl,
107809
+ current = params.current,
107810
+ localizedBase = params.localizedBase,
107811
+ country = params.country,
107812
+ language = params.language,
107813
+ isNuSkinDomain = params.isNuSkinDomain;
107814
+ if (isProtocolRelativeUrl(trimmedUrl)) {
107815
+ var url = new URL("https:".concat(trimmedUrl));
107816
+ var fallback = "https:".concat(trimmedUrl);
107817
+ return isNuSkinDomain(url.host) ? resolveNuSkinUrl({
107818
+ url: url,
107819
+ fallback: fallback,
107820
+ current: current,
107821
+ localizedBase: localizedBase,
107822
+ country: country,
107823
+ language: language
107824
+ }) : fallback;
107825
+ }
107826
+ if (isAbsoluteHttpUrl(trimmedUrl)) {
107827
+ var _url = new URL(trimmedUrl);
107828
+ return isNuSkinDomain(_url.host) ? resolveNuSkinUrl({
107829
+ url: _url,
107830
+ fallback: trimmedUrl,
107831
+ current: current,
107832
+ localizedBase: localizedBase,
107833
+ country: country,
107834
+ language: language
107835
+ }) : trimmedUrl;
107764
107836
  }
107765
- return url;
107837
+ if (isPlainDomain(trimmedUrl)) {
107838
+ return "https://".concat(trimmedUrl);
107839
+ }
107840
+ return undefined;
107841
+ }
107842
+ function buildLocalizedRelativeUrl(params) {
107843
+ var trimmedUrl = params.trimmedUrl,
107844
+ country = params.country,
107845
+ language = params.language,
107846
+ localizedBase = params.localizedBase;
107847
+ var hadTrailingSlash = trimmedUrl.endsWith("/");
107848
+ var relativeUrl = trimmedUrl.replace(/^\.[a-z]{2,}/i, "");
107849
+ relativeUrl = replaceLocalePlaceholders(relativeUrl, country, language);
107850
+ if (hasLocalePrefix(relativeUrl)) {
107851
+ relativeUrl = relativeUrl.replace(/^\/[a-z]{2}\/[a-z]{2}/i, "");
107852
+ }
107853
+ relativeUrl = relativeUrl.replace(/^\/+/, "/");
107854
+ if (!relativeUrl.startsWith("/")) {
107855
+ relativeUrl = "/".concat(relativeUrl);
107856
+ }
107857
+ if (relativeUrl === "/" || relativeUrl === "") {
107858
+ return hadTrailingSlash ? "".concat(localizedBase, "/") : localizedBase;
107859
+ }
107860
+ return "".concat(localizedBase).concat(relativeUrl);
107861
+ }
107862
+ var convertToLocalizedUrl = function convertToLocalizedUrl(inputUrl) {
107863
+ var _globalThis$window$lo, _globalThis$window;
107864
+ if (!inputUrl) return inputUrl;
107865
+ var trimmedUrl = inputUrl.trim();
107866
+
107867
+ // During SSR, window is undefined. renderAndExtractContext sets __ssrLocationHref__
107868
+ // (synchronously, no race condition) so we can still produce fully-qualified URLs.
107869
+ var locationHref = (_globalThis$window$lo = (_globalThis$window = globalThis.window) === null || _globalThis$window === void 0 || (_globalThis$window = _globalThis$window.location) === null || _globalThis$window === void 0 ? void 0 : _globalThis$window.href) !== null && _globalThis$window$lo !== void 0 ? _globalThis$window$lo : globalThis.__ssrLocationHref__;
107870
+ if (locationHref == null) {
107871
+ return trimmedUrl;
107872
+ }
107873
+ var current = new URL(locationHref);
107874
+ var _current$pathname$spl = current.pathname.split("/"),
107875
+ _current$pathname$spl2 = common_slicedToArray(_current$pathname$spl, 3),
107876
+ country = _current$pathname$spl2[1],
107877
+ language = _current$pathname$spl2[2];
107878
+ if (!country || !language) return trimmedUrl;
107879
+ var localizedBase = "".concat(current.protocol, "//").concat(current.host, "/").concat(country, "/").concat(language);
107880
+ var isNuSkinDomain = function isNuSkinDomain(host) {
107881
+ return host === current.host || host.endsWith(".nuskin.com") || host === "nuskin.com";
107882
+ };
107883
+ var resolvedUrl = resolveExternalOrAbsoluteUrl({
107884
+ trimmedUrl: trimmedUrl,
107885
+ current: current,
107886
+ localizedBase: localizedBase,
107887
+ country: country,
107888
+ language: language,
107889
+ isNuSkinDomain: isNuSkinDomain
107890
+ });
107891
+ if (resolvedUrl !== undefined) {
107892
+ return resolvedUrl;
107893
+ }
107894
+ return buildLocalizedRelativeUrl({
107895
+ trimmedUrl: trimmedUrl,
107896
+ country: country,
107897
+ language: language,
107898
+ localizedBase: localizedBase
107899
+ });
107766
107900
  };
107767
- var isServer = typeof window === "undefined";
107768
107901
  ;// ./src/components/top-ribbon/types.js
107769
107902
 
107770
107903
  var NavigationLinkPropTypes = external_prop_types_default().shape({
107771
107904
  label: (external_prop_types_default()).string.isRequired,
107772
107905
  url: (external_prop_types_default()).string.isRequired,
107773
- ariaLabel: (external_prop_types_default()).string,
107774
- dataTestId: (external_prop_types_default()).string,
107906
+ show: (external_prop_types_default()).bool,
107775
107907
  gtmEvent: (external_prop_types_default()).object
107776
107908
  });
107909
+ var TopRibbonEntryPropTypes = external_prop_types_default().shape({
107910
+ show_top_ribbon: (external_prop_types_default()).bool.isRequired,
107911
+ links: external_prop_types_default().arrayOf(NavigationLinkPropTypes)
107912
+ });
107777
107913
  var TopRibbonPropTypes = {
107778
- links: external_prop_types_default().arrayOf(NavigationLinkPropTypes).isRequired,
107914
+ links: external_prop_types_default().arrayOf(TopRibbonEntryPropTypes).isRequired,
107779
107915
  className: (external_prop_types_default()).string,
107780
107916
  ariaLabel: (external_prop_types_default()).string,
107781
107917
  dataTestId: (external_prop_types_default()).string
107782
107918
  };
107783
- ;// ./src/components/top-ribbon/TopRibbon.styled.jsx
107919
+ ;// ./src/components/top-ribbon/TopRibbon.styled.js
107784
107920
 
107785
107921
  function TopRibbon_styled_EMOTION_STRINGIFIED_CSS_ERROR_() { return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."; }
107786
107922
  // Main container for the top ribbon navigation
107787
107923
  var StyledTopRibbon = /*#__PURE__*/createStyled("header", true ? {
107788
- target: "ei9etl03"
107924
+ target: "ec2gm7w3"
107789
107925
  } : 0)( true ? {
107790
107926
  name: "ah54qx",
107791
107927
  styles: "background-color:#000000;width:100%;position:relative;overflow-x:auto;-webkit-overflow-scrolling:touch;scrollbar-width:none;&::-webkit-scrollbar{display:none;}&:focus-within{outline:none;}"
@@ -107793,7 +107929,7 @@ var StyledTopRibbon = /*#__PURE__*/createStyled("header", true ? {
107793
107929
 
107794
107930
  // Navigation list container
107795
107931
  var StyledNavigationList = /*#__PURE__*/createStyled("ul", true ? {
107796
- target: "ei9etl02"
107932
+ target: "ec2gm7w2"
107797
107933
  } : 0)( true ? {
107798
107934
  name: "m78rlq",
107799
107935
  styles: "margin:0 auto;padding:0;list-style:none;display:flex;align-items:center;justify-content:center;gap:24px;padding:10px 24px;min-width:100%;width:max-content;box-sizing:border-box"
@@ -107801,15 +107937,15 @@ var StyledNavigationList = /*#__PURE__*/createStyled("ul", true ? {
107801
107937
 
107802
107938
  // Individual navigation item container
107803
107939
  var StyledNavigationItem = /*#__PURE__*/createStyled("li", true ? {
107804
- target: "ei9etl01"
107805
- } : 0)( true ? {
107806
- name: "qy80on",
107807
- styles: "margin:0;padding:0;flex-shrink:0;position:relative"
107808
- } : 0);
107940
+ target: "ec2gm7w1"
107941
+ } : 0)("margin:0;padding:0;flex-shrink:0;position:relative;", function (_ref) {
107942
+ var $editing = _ref.$editing;
107943
+ return $editing && "\n padding-right: 24px;\n padding-left: 24px;\n ";
107944
+ }, ";" + ( true ? "" : 0));
107809
107945
 
107810
107946
  // Navigation link with hover effects
107811
107947
  var StyledNavigationLink = /*#__PURE__*/createStyled("a", true ? {
107812
- target: "ei9etl00"
107948
+ target: "ec2gm7w0"
107813
107949
  } : 0)( true ? {
107814
107950
  name: "1pvnuug",
107815
107951
  styles: "display:inline-block;padding:0;cursor:pointer;color:#ffffff;font-family:\"Inter\",-apple-system,BlinkMacSystemFont,\"Segoe UI\",Roboto,sans-serif;font-size:14px;font-weight:400;line-height:20px;text-align:center;white-space:nowrap;text-decoration:underline;text-decoration-style:solid;text-decoration-color:transparent;transition:text-decoration-color 0.2s ease,background-color 0.2s ease;position:relative;&:hover{color:#ffffff;text-decoration-color:#ffffff;}&:focus-visible{outline:2px solid #ffffff;outline-offset:2px;background-color:rgba(255, 255, 255, 0.1);text-decoration-color:#ffffff;}&:focus:not(:focus-visible){outline:none;background-color:transparent;}&:active{background-color:rgba(255, 255, 255, 0.05);}@media (prefers-contrast: high){&:focus-visible{outline-color:currentColor;}}"
@@ -107826,6 +107962,7 @@ function TopRibbon_toPrimitive(t, r) { if ("object" != TopRibbon_typeof(t) || !t
107826
107962
 
107827
107963
 
107828
107964
 
107965
+
107829
107966
  /**
107830
107967
  * TopRibbon Navigation Component
107831
107968
  *
@@ -107843,17 +107980,27 @@ function TopRibbon_toPrimitive(t, r) { if ("object" != TopRibbon_typeof(t) || !t
107843
107980
  */
107844
107981
 
107845
107982
  var TopRibbon = function TopRibbon(_ref) {
107983
+ var _ribbonData$$;
107846
107984
  var links = _ref.links,
107847
107985
  _ref$className = _ref.className,
107848
- className = _ref$className === void 0 ? '' : _ref$className,
107986
+ className = _ref$className === void 0 ? "" : _ref$className,
107849
107987
  _ref$ariaLabel = _ref.ariaLabel,
107850
- ariaLabel = _ref$ariaLabel === void 0 ? 'Top navigation' : _ref$ariaLabel,
107988
+ ariaLabel = _ref$ariaLabel === void 0 ? "Top navigation" : _ref$ariaLabel,
107851
107989
  _ref$dataTestId = _ref.dataTestId,
107852
- dataTestId = _ref$dataTestId === void 0 ? 'top-ribbon-nav' : _ref$dataTestId;
107990
+ dataTestId = _ref$dataTestId === void 0 ? "top-ribbon-nav" : _ref$dataTestId;
107853
107991
  // Validate required props — safe to call in SSR
107854
107992
  if (!links || !Array.isArray(links) || links.length === 0) {
107855
107993
  return null;
107856
107994
  }
107995
+ var ribbonData = links[0];
107996
+ if (!(ribbonData !== null && ribbonData !== void 0 && ribbonData.show_top_ribbon)) {
107997
+ return null;
107998
+ }
107999
+ var navLinks = ribbonData.links;
108000
+ if (!navLinks || !Array.isArray(navLinks) || navLinks.length === 0) {
108001
+ return null;
108002
+ }
108003
+ var editing = isEditingMode();
107857
108004
 
107858
108005
  /**
107859
108006
  * Fires a GTM dataLayer event when a link is clicked.
@@ -107863,9 +108010,9 @@ var TopRibbon = function TopRibbon(_ref) {
107863
108010
  * @param {Object} item - The navigation item that was clicked
107864
108011
  */
107865
108012
  var handleClick = function handleClick(item) {
107866
- if (typeof window === 'undefined' || !Array.isArray(window.dataLayer)) return;
108013
+ if (typeof window === "undefined" || !Array.isArray(window.dataLayer)) return;
107867
108014
  window.dataLayer.push(TopRibbon_objectSpread({
107868
- event: 'top_ribbon_click',
108015
+ event: "top_ribbon_click",
107869
108016
  link_text: item.label,
107870
108017
  link_url: item.url
107871
108018
  }, item.gtmEvent));
@@ -107877,20 +108024,26 @@ var TopRibbon = function TopRibbon(_ref) {
107877
108024
  "aria-label": ariaLabel,
107878
108025
  role: "navigation",
107879
108026
  "data-testid": "".concat(dataTestId, "-nav"),
107880
- children: /*#__PURE__*/(0,jsx_runtime_.jsx)(StyledNavigationList, {
107881
- "data-testid": "".concat(dataTestId, "-list"),
107882
- children: links.map(function (item, index) {
107883
- if (!item || TopRibbon_typeof(item) !== 'object') return null;
108027
+ children: /*#__PURE__*/(0,jsx_runtime_.jsx)(StyledNavigationList, TopRibbon_objectSpread(TopRibbon_objectSpread({
108028
+ "data-testid": "".concat(dataTestId, "-list")
108029
+ }, editing ? TopRibbon_objectSpread(TopRibbon_objectSpread({}, (_ribbonData$$ = ribbonData.$) === null || _ribbonData$$ === void 0 ? void 0 : _ribbonData$$.links), {}, {
108030
+ "data-add-direction": "horizontal"
108031
+ }) : null), {}, {
108032
+ children: navLinks.map(function (item, index) {
108033
+ var _ribbonData$top_ribbo, _ribbonData$$2, _item$$;
108034
+ if (!item || TopRibbon_typeof(item) !== "object") return null;
107884
108035
  var label = item.label,
107885
108036
  url = item.url,
107886
- itemAriaLabel = item.ariaLabel,
107887
- itemTestId = item.dataTestId;
108037
+ show = item.show;
108038
+ if (show === false) return null;
107888
108039
  if (!label || !url) return null;
107889
- var linkHref = validateUrl(url);
107890
- var linkAriaLabel = itemAriaLabel || "Navigate to ".concat(label);
107891
- var linkTestId = itemTestId || "".concat(dataTestId, "-item-").concat(index);
107892
- return /*#__PURE__*/(0,jsx_runtime_.jsx)(StyledNavigationItem, {
108040
+ var linkHref = convertToLocalizedUrl(url);
108041
+ var linkAriaLabel = "".concat((_ribbonData$top_ribbo = ribbonData.top_ribbon_item_aria_label) !== null && _ribbonData$top_ribbo !== void 0 ? _ribbonData$top_ribbo : "Navigate to", " ").concat(label);
108042
+ var linkTestId = "".concat(dataTestId, "-item-").concat(index);
108043
+ return /*#__PURE__*/(0,jsx_runtime_.jsx)(StyledNavigationItem, TopRibbon_objectSpread(TopRibbon_objectSpread({
107893
108044
  "data-testid": "".concat(linkTestId, "-container"),
108045
+ $editing: editing
108046
+ }, editing ? (_ribbonData$$2 = ribbonData.$) === null || _ribbonData$$2 === void 0 ? void 0 : _ribbonData$$2["links__".concat(index)] : null), {}, {
107894
108047
  children: /*#__PURE__*/(0,jsx_runtime_.jsx)(StyledNavigationLink, {
107895
108048
  href: linkHref,
107896
108049
  target: "_blank",
@@ -107900,11 +108053,13 @@ var TopRibbon = function TopRibbon(_ref) {
107900
108053
  },
107901
108054
  "aria-label": linkAriaLabel,
107902
108055
  "data-testid": linkTestId,
107903
- children: label
108056
+ children: /*#__PURE__*/(0,jsx_runtime_.jsx)("span", TopRibbon_objectSpread(TopRibbon_objectSpread({}, editing ? (_item$$ = item.$) === null || _item$$ === void 0 ? void 0 : _item$$.label : null), {}, {
108057
+ children: label
108058
+ }))
107904
108059
  })
107905
- }, "nav-item-".concat(index, "-").concat(label));
108060
+ }), "nav-item-".concat(index, "-").concat(label));
107906
108061
  })
107907
- })
108062
+ }))
107908
108063
  })
107909
108064
  });
107910
108065
  };
@@ -110440,35 +110595,6 @@ var DEFAULT_CART = {
110440
110595
  aria_label: "Shopping cart",
110441
110596
  count: 0
110442
110597
  };
110443
- var DEFAULT_TOP_RIBBON_LINKS = [{
110444
- label: "Hair",
110445
- url: "/hair",
110446
- ariaLabel: "Shop Hair"
110447
- }, {
110448
- label: "Skin",
110449
- url: "/skin",
110450
- ariaLabel: "Shop Skin"
110451
- }, {
110452
- label: "Body",
110453
- url: "/body",
110454
- ariaLabel: "Shop Body"
110455
- }, {
110456
- label: "Fragrance",
110457
- url: "/fragrance",
110458
- ariaLabel: "Shop Fragrance"
110459
- }, {
110460
- label: "Beauty Bio",
110461
- url: "/beauty-bio",
110462
- ariaLabel: "Shop Beauty Bio"
110463
- }, {
110464
- label: "Accessories",
110465
- url: "/accessories",
110466
- ariaLabel: "Shop Accessories"
110467
- }, {
110468
- label: "Gifts",
110469
- url: "/gifts",
110470
- ariaLabel: "Shop Gifts"
110471
- }];
110472
110598
  function firstDefined() {
110473
110599
  for (var _len = arguments.length, values = new Array(_len), _key = 0; _key < _len; _key++) {
110474
110600
  values[_key] = arguments[_key];
@@ -110546,7 +110672,7 @@ function buildAccountParentTags(_ref2) {
110546
110672
  };
110547
110673
  }
110548
110674
  function HeaderView(_ref3) {
110549
- var _headerEntry$logo, _headerEntry$locale_s, _utilityLinksEntry$lo, _utilityLinksEntry$lo2, _headerEntry$cart, _storefrontParams$car, _headerEntry$top_ribb, _headerEntry$market_s, _headerEntry$translat, _headerEntry$translat2, _headerEntry$$, _ref4, _headerEntry$locale, _headerEntry$$2, _headerEntry$$3;
110675
+ var _headerEntry$logo, _headerEntry$locale_s, _utilityLinksEntry$lo, _utilityLinksEntry$lo2, _headerEntry$cart, _storefrontParams$car, _headerEntry$$, _headerEntry$top_ribb, _headerEntry$market_s, _headerEntry$translat, _headerEntry$translat2, _topRibbon$top_ribbon, _headerEntry$$2, _ref4, _headerEntry$locale, _headerEntry$$3, _headerEntry$$4;
110550
110676
  var country = _ref3.country,
110551
110677
  language = _ref3.language,
110552
110678
  locale = _ref3.locale,
@@ -110579,7 +110705,8 @@ function HeaderView(_ref3) {
110579
110705
  var cartData = HeaderView_objectSpread(HeaderView_objectSpread({}, (_headerEntry$cart = headerEntry === null || headerEntry === void 0 ? void 0 : headerEntry.cart) !== null && _headerEntry$cart !== void 0 ? _headerEntry$cart : DEFAULT_CART), {}, {
110580
110706
  item_count: (_storefrontParams$car = storefrontParams === null || storefrontParams === void 0 ? void 0 : storefrontParams.cartCount) !== null && _storefrontParams$car !== void 0 ? _storefrontParams$car : 0
110581
110707
  });
110582
- var topRibbonLinks = (_headerEntry$top_ribb = headerEntry === null || headerEntry === void 0 ? void 0 : headerEntry.top_ribbon_links) !== null && _headerEntry$top_ribb !== void 0 ? _headerEntry$top_ribb : DEFAULT_TOP_RIBBON_LINKS;
110708
+ var $ = (_headerEntry$$ = headerEntry === null || headerEntry === void 0 ? void 0 : headerEntry.$) !== null && _headerEntry$$ !== void 0 ? _headerEntry$$ : {};
110709
+ var topRibbon = (_headerEntry$top_ribb = headerEntry === null || headerEntry === void 0 ? void 0 : headerEntry.top_ribbon) !== null && _headerEntry$top_ribb !== void 0 ? _headerEntry$top_ribb : null;
110583
110710
  var navigationData = headerEntry === null || headerEntry === void 0 ? void 0 : headerEntry.top_navigation;
110584
110711
  var marketSelector = (_headerEntry$market_s = headerEntry === null || headerEntry === void 0 ? void 0 : headerEntry.market_selector) !== null && _headerEntry$market_s !== void 0 ? _headerEntry$market_s : DEFAULT_MARKET_SELECTOR;
110585
110712
  var translations = (_headerEntry$translat = headerEntry === null || headerEntry === void 0 || (_headerEntry$translat2 = headerEntry.translations) === null || _headerEntry$translat2 === void 0 ? void 0 : _headerEntry$translat2[0]) !== null && _headerEntry$translat !== void 0 ? _headerEntry$translat : null;
@@ -110588,11 +110715,13 @@ function HeaderView(_ref3) {
110588
110715
  "data-country": country,
110589
110716
  "data-language": language,
110590
110717
  "data-locale": locale,
110591
- children: [/*#__PURE__*/(0,jsx_runtime_.jsx)(top_ribbon_TopRibbon, {
110592
- links: topRibbonLinks,
110593
- ariaLabel: "Top navigation",
110594
- dataTestId: "header-top-ribbon"
110595
- }), /*#__PURE__*/(0,jsx_runtime_.jsxs)(TopHeaderRow, {
110718
+ children: [(topRibbon === null || topRibbon === void 0 ? void 0 : topRibbon.show_top_ribbon) && /*#__PURE__*/(0,jsx_runtime_.jsx)("div", HeaderView_objectSpread(HeaderView_objectSpread(HeaderView_objectSpread({}, ($ === null || $ === void 0 ? void 0 : $.top_ribbon) || {}), ($ === null || $ === void 0 ? void 0 : $.top_ribbon__parent) || {}), {}, {
110719
+ children: /*#__PURE__*/(0,jsx_runtime_.jsx)(top_ribbon_TopRibbon, {
110720
+ links: [topRibbon],
110721
+ ariaLabel: (_topRibbon$top_ribbon = topRibbon.top_ribbon_aria_label) !== null && _topRibbon$top_ribbon !== void 0 ? _topRibbon$top_ribbon : "Top Ribbon",
110722
+ dataTestId: "header-top-ribbon"
110723
+ })
110724
+ })), /*#__PURE__*/(0,jsx_runtime_.jsxs)(TopHeaderRow, {
110596
110725
  children: [/*#__PURE__*/(0,jsx_runtime_.jsx)(MobileMenuButton, {
110597
110726
  onClick: function onClick() {
110598
110727
  return setIsMobileMenuOpen(true);
@@ -110621,7 +110750,7 @@ function HeaderView(_ref3) {
110621
110750
  showDesktopTrigger: false
110622
110751
  }), /*#__PURE__*/(0,jsx_runtime_.jsx)(HeaderCartRegion, {
110623
110752
  data: cartData,
110624
- parent$: headerEntry === null || headerEntry === void 0 || (_headerEntry$$ = headerEntry.$) === null || _headerEntry$$ === void 0 ? void 0 : _headerEntry$$.cart
110753
+ parent$: headerEntry === null || headerEntry === void 0 || (_headerEntry$$2 = headerEntry.$) === null || _headerEntry$$2 === void 0 ? void 0 : _headerEntry$$2.cart
110625
110754
  })]
110626
110755
  }), /*#__PURE__*/(0,jsx_runtime_.jsx)(RightHeaderCluster, {
110627
110756
  children: /*#__PURE__*/(0,jsx_runtime_.jsxs)(UtilityBar, {
@@ -110630,7 +110759,7 @@ function HeaderView(_ref3) {
110630
110759
  data: marketSelector,
110631
110760
  logo: logoData,
110632
110761
  locale: String((_ref4 = (_headerEntry$locale = headerEntry === null || headerEntry === void 0 ? void 0 : headerEntry.locale) !== null && _headerEntry$locale !== void 0 ? _headerEntry$locale : locale) !== null && _ref4 !== void 0 ? _ref4 : "").trim(),
110633
- parent$: headerEntry === null || headerEntry === void 0 || (_headerEntry$$2 = headerEntry.$) === null || _headerEntry$$2 === void 0 ? void 0 : _headerEntry$$2.market_selector__0,
110762
+ parent$: headerEntry === null || headerEntry === void 0 || (_headerEntry$$3 = headerEntry.$) === null || _headerEntry$$3 === void 0 ? void 0 : _headerEntry$$3.market_selector__0,
110634
110763
  mobileTriggerMode: "drawerPortal",
110635
110764
  drawerOpen: isMobileMenuOpen,
110636
110765
  drawerTriggerMountRef: mobileMarketTriggerMountRef
@@ -110641,7 +110770,7 @@ function HeaderView(_ref3) {
110641
110770
  parent$: accountParentTags
110642
110771
  }), /*#__PURE__*/(0,jsx_runtime_.jsx)(HeaderCartRegion, {
110643
110772
  data: cartData,
110644
- parent$: headerEntry === null || headerEntry === void 0 || (_headerEntry$$3 = headerEntry.$) === null || _headerEntry$$3 === void 0 ? void 0 : _headerEntry$$3.cart
110773
+ parent$: headerEntry === null || headerEntry === void 0 || (_headerEntry$$4 = headerEntry.$) === null || _headerEntry$$4 === void 0 ? void 0 : _headerEntry$$4.cart
110645
110774
  })]
110646
110775
  })
110647
110776
  })]