@nuskin/nextgen-header 1.28.0 → 1.29.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.
@@ -1832,27 +1832,6 @@ var _default = exports["default"] = (0, _createSvgIcon.default)( /*#__PURE__*/(0
1832
1832
 
1833
1833
  /***/ },
1834
1834
 
1835
- /***/ 4745
1836
- (__unused_webpack_module, exports, __webpack_require__) {
1837
-
1838
- "use strict";
1839
- var __webpack_unused_export__;
1840
-
1841
- "use client";
1842
-
1843
- var _interopRequireDefault = __webpack_require__(4994);
1844
- __webpack_unused_export__ = ({
1845
- value: true
1846
- });
1847
- exports.A = void 0;
1848
- var _createSvgIcon = _interopRequireDefault(__webpack_require__(2032));
1849
- var _jsxRuntime = __webpack_require__(8732);
1850
- var _default = exports.A = (0, _createSvgIcon.default)( /*#__PURE__*/(0, _jsxRuntime.jsx)("path", {
1851
- d: "M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14"
1852
- }), 'Search');
1853
-
1854
- /***/ },
1855
-
1856
1835
  /***/ 2032
1857
1836
  (__unused_webpack_module, exports, __webpack_require__) {
1858
1837
 
@@ -100851,7 +100830,7 @@ const utils_namespaceObject = require("@contentstack/utils");
100851
100830
  ;// ./src/utils/constants.js
100852
100831
  var HEADER_CONTENT_ENTRY_UID = "global_header";
100853
100832
  var HEADER_ENTRY_URL = "/vb-header/root-header";
100854
- 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", "market_selector.regions.markets.languages", "utility_links.sign_up_sign_in_component", "product_search"]));
100833
+ 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"]));
100855
100834
  var CONTENTSTACK_API_KEY = process.env.CONTENTSTACK_API_KEY;
100856
100835
  var CONTENTSTACK_DELIVERY_TOKEN = process.env.CONTENTSTACK_DELIVERY_TOKEN;
100857
100836
  var CONTENTSTACK_ENVIRONMENT = process.env.CONTENTSTACK_ENVIRONMENT;
@@ -101406,25 +101385,201 @@ HeaderLoyaltyRegion.propTypes = {
101406
101385
  $: (external_prop_types_default()).object
101407
101386
  }).isRequired
101408
101387
  };
101388
+ ;// ./src/components/signup-signin/SignUpOrSignIn.helpers.js
101389
+ var DEFAULT_SIGN_UP = {
101390
+ title: "Sign Up",
101391
+ url: ""
101392
+ };
101393
+ var DEFAULT_SIGN_IN = {
101394
+ title: "Sign In",
101395
+ url: ""
101396
+ };
101397
+ var DEFAULT_ICON = "userOutline";
101398
+ var ALLOWED_ICON_NAMES = new Set(["userOutline", "userIcon"]);
101399
+ var ICON_COLOR_MAP = {
101400
+ black: "#000000",
101401
+ white: "#ffffff",
101402
+ grey: "#808080"
101403
+ };
101404
+ function navigateToUrl(url) {
101405
+ var _globalThis$window;
101406
+ var resolvedUrl = String(url !== null && url !== void 0 ? url : "").trim();
101407
+ if (!resolvedUrl) return;
101408
+ (_globalThis$window = globalThis.window) === null || _globalThis$window === void 0 || (_globalThis$window = _globalThis$window.location) === null || _globalThis$window === void 0 || _globalThis$window.assign(resolvedUrl);
101409
+ }
101410
+ function handleKeyboardActivate(event) {
101411
+ if (event.key !== "Enter" && event.key !== " ") return;
101412
+ if (!event.currentTarget.matches(":focus-visible")) return;
101413
+ event.preventDefault();
101414
+ event.currentTarget.click();
101415
+ }
101416
+ function parentEditableProps(parent$, key) {
101417
+ var _parent$$key;
101418
+ return (_parent$$key = parent$ === null || parent$ === void 0 ? void 0 : parent$[key]) !== null && _parent$$key !== void 0 ? _parent$$key : {};
101419
+ }
101420
+ function getEffectiveAuthDisplay(resolvedLinks, sign_up, sign_in) {
101421
+ var _sign_up$title, _sign_in$title, _effectiveSignUp$titl, _effectiveSignIn$titl;
101422
+ var signUpTitle = (_sign_up$title = sign_up === null || sign_up === void 0 ? void 0 : sign_up.title) !== null && _sign_up$title !== void 0 ? _sign_up$title : "Sign Up";
101423
+ var signInTitle = (_sign_in$title = sign_in === null || sign_in === void 0 ? void 0 : sign_in.title) !== null && _sign_in$title !== void 0 ? _sign_in$title : "Sign In";
101424
+ var effectiveSignUp = (resolvedLinks === null || resolvedLinks === void 0 ? void 0 : resolvedLinks.sign_up) || sign_up;
101425
+ var effectiveSignIn = (resolvedLinks === null || resolvedLinks === void 0 ? void 0 : resolvedLinks.sign_in) || sign_in;
101426
+ return {
101427
+ effectiveSignUp: effectiveSignUp,
101428
+ effectiveSignIn: effectiveSignIn,
101429
+ effectiveSignUpTitle: (_effectiveSignUp$titl = effectiveSignUp === null || effectiveSignUp === void 0 ? void 0 : effectiveSignUp.title) !== null && _effectiveSignUp$titl !== void 0 ? _effectiveSignUp$titl : signUpTitle,
101430
+ effectiveSignInTitle: (_effectiveSignIn$titl = effectiveSignIn === null || effectiveSignIn === void 0 ? void 0 : effectiveSignIn.title) !== null && _effectiveSignIn$titl !== void 0 ? _effectiveSignIn$titl : signInTitle
101431
+ };
101432
+ }
101433
+ function getIconPresentation(icon, icon_color) {
101434
+ var normalizedIconName = String(icon !== null && icon !== void 0 ? icon : DEFAULT_ICON).trim();
101435
+ var resolvedIconName = ALLOWED_ICON_NAMES.has(normalizedIconName) ? normalizedIconName : DEFAULT_ICON;
101436
+ var normalizedColorName = String(icon_color !== null && icon_color !== void 0 ? icon_color : "").trim().toLowerCase();
101437
+ return {
101438
+ resolvedIconName: resolvedIconName,
101439
+ resolvedIconColor: ICON_COLOR_MAP[normalizedColorName]
101440
+ };
101441
+ }
101442
+ function handleSignUpNavigate(editing, url) {
101443
+ if (editing) return;
101444
+ navigateToUrl(url);
101445
+ }
101446
+ function handleSignInActivate(editing, isMobile, setIsModalOpen, url) {
101447
+ if (editing) return;
101448
+ if (isMobile) {
101449
+ setIsModalOpen(true);
101450
+ return;
101451
+ }
101452
+ navigateToUrl(url);
101453
+ }
101454
+ function handleModalAuthNavigate(editing, closeModal, url) {
101455
+ if (editing) return;
101456
+ closeModal();
101457
+ navigateToUrl(url);
101458
+ }
101459
+ function mergeAuthLinksFromService(links, sign_up, sign_in) {
101460
+ if (!links) return {
101461
+ sign_up: sign_up,
101462
+ sign_in: sign_in
101463
+ };
101464
+ return {
101465
+ sign_up: links.sign_up || links.signUp || sign_up,
101466
+ sign_in: links.sign_in || links.signIn || sign_in
101467
+ };
101468
+ }
101469
+ ;// ./src/components/signup-signin/SignUpOrSignIn.hooks.js
101470
+ function SignUpOrSignIn_hooks_regenerator() { /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */ var e, t, r = "function" == typeof Symbol ? Symbol : {}, n = r.iterator || "@@iterator", o = r.toStringTag || "@@toStringTag"; function i(r, n, o, i) { var c = n && n.prototype instanceof Generator ? n : Generator, u = Object.create(c.prototype); return SignUpOrSignIn_hooks_regeneratorDefine2(u, "_invoke", function (r, n, o) { var i, c, u, f = 0, p = o || [], y = !1, G = { p: 0, n: 0, v: e, a: d, f: d.bind(e, 4), d: function d(t, r) { return i = t, c = 0, u = e, G.n = r, a; } }; function d(r, n) { for (c = r, u = n, t = 0; !y && f && !o && t < p.length; t++) { var o, i = p[t], d = G.p, l = i[2]; r > 3 ? (o = l === n) && (u = i[(c = i[4]) ? 5 : (c = 3, 3)], i[4] = i[5] = e) : i[0] <= d && ((o = r < 2 && d < i[1]) ? (c = 0, G.v = n, G.n = i[1]) : d < l && (o = r < 3 || i[0] > n || n > l) && (i[4] = r, i[5] = n, G.n = l, c = 0)); } if (o || r > 1) return a; throw y = !0, n; } return function (o, p, l) { if (f > 1) throw TypeError("Generator is already running"); for (y && 1 === p && d(p, l), c = p, u = l; (t = c < 2 ? e : u) || !y;) { i || (c ? c < 3 ? (c > 1 && (G.n = -1), d(c, u)) : G.n = u : G.v = u); try { if (f = 2, i) { if (c || (o = "next"), t = i[o]) { if (!(t = t.call(i, u))) throw TypeError("iterator result is not an object"); if (!t.done) return t; u = t.value, c < 2 && (c = 0); } else 1 === c && (t = i["return"]) && t.call(i), c < 2 && (u = TypeError("The iterator does not provide a '" + o + "' method"), c = 1); i = e; } else if ((t = (y = G.n < 0) ? u : r.call(n, G)) !== a) break; } catch (t) { i = e, c = 1, u = t; } finally { f = 1; } } return { value: t, done: y }; }; }(r, o, i), !0), u; } var a = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} t = Object.getPrototypeOf; var c = [][n] ? t(t([][n]())) : (SignUpOrSignIn_hooks_regeneratorDefine2(t = {}, n, function () { return this; }), t), u = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(c); function f(e) { return Object.setPrototypeOf ? Object.setPrototypeOf(e, GeneratorFunctionPrototype) : (e.__proto__ = GeneratorFunctionPrototype, SignUpOrSignIn_hooks_regeneratorDefine2(e, o, "GeneratorFunction")), e.prototype = Object.create(u), e; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, SignUpOrSignIn_hooks_regeneratorDefine2(u, "constructor", GeneratorFunctionPrototype), SignUpOrSignIn_hooks_regeneratorDefine2(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = "GeneratorFunction", SignUpOrSignIn_hooks_regeneratorDefine2(GeneratorFunctionPrototype, o, "GeneratorFunction"), SignUpOrSignIn_hooks_regeneratorDefine2(u), SignUpOrSignIn_hooks_regeneratorDefine2(u, o, "Generator"), SignUpOrSignIn_hooks_regeneratorDefine2(u, n, function () { return this; }), SignUpOrSignIn_hooks_regeneratorDefine2(u, "toString", function () { return "[object Generator]"; }), (SignUpOrSignIn_hooks_regenerator = function _regenerator() { return { w: i, m: f }; })(); }
101471
+ function SignUpOrSignIn_hooks_regeneratorDefine2(e, r, n, t) { var i = Object.defineProperty; try { i({}, "", {}); } catch (e) { i = 0; } SignUpOrSignIn_hooks_regeneratorDefine2 = function _regeneratorDefine(e, r, n, t) { function o(r, n) { SignUpOrSignIn_hooks_regeneratorDefine2(e, r, function (e) { return this._invoke(r, n, e); }); } r ? i ? i(e, r, { value: n, enumerable: !t, configurable: !t, writable: !t }) : e[r] = n : (o("next", 0), o("throw", 1), o("return", 2)); }, SignUpOrSignIn_hooks_regeneratorDefine2(e, r, n, t); }
101472
+ function SignUpOrSignIn_hooks_asyncGeneratorStep(n, t, e, r, o, a, c) { try { var i = n[a](c), u = i.value; } catch (n) { return void e(n); } i.done ? t(u) : Promise.resolve(u).then(r, o); }
101473
+ function SignUpOrSignIn_hooks_asyncToGenerator(n) { return function () { var t = this, e = arguments; return new Promise(function (r, o) { var a = n.apply(t, e); function _next(n) { SignUpOrSignIn_hooks_asyncGeneratorStep(a, r, o, _next, _throw, "next", n); } function _throw(n) { SignUpOrSignIn_hooks_asyncGeneratorStep(a, r, o, _next, _throw, "throw", n); } _next(void 0); }); }; }
101474
+ function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || SignUpOrSignIn_hooks_unsupportedIterableToArray(r, e) || _nonIterableRest(); }
101475
+ function _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."); }
101476
+ function SignUpOrSignIn_hooks_unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return SignUpOrSignIn_hooks_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) ? SignUpOrSignIn_hooks_arrayLikeToArray(r, a) : void 0; } }
101477
+ function SignUpOrSignIn_hooks_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; }
101478
+ function _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; } }
101479
+ function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
101480
+
101481
+
101482
+ function useIsMobileViewport() {
101483
+ var _useState = (0,external_react_.useState)(false),
101484
+ _useState2 = _slicedToArray(_useState, 2),
101485
+ isMobile = _useState2[0],
101486
+ setIsMobile = _useState2[1];
101487
+ (0,external_react_.useEffect)(function () {
101488
+ var browserWindow = globalThis.window;
101489
+ if (!(browserWindow !== null && browserWindow !== void 0 && browserWindow.matchMedia)) return undefined;
101490
+ var mediaQuery = browserWindow.matchMedia("(max-width: 1024px)");
101491
+ var sync = function sync() {
101492
+ return setIsMobile(mediaQuery.matches);
101493
+ };
101494
+ sync();
101495
+ mediaQuery.addEventListener("change", sync);
101496
+ return function () {
101497
+ return mediaQuery.removeEventListener("change", sync);
101498
+ };
101499
+ }, []);
101500
+ return isMobile;
101501
+ }
101502
+ function useResolvedAuthLinks(sign_up, sign_in, authService) {
101503
+ var _useState3 = (0,external_react_.useState)({
101504
+ sign_up: sign_up,
101505
+ sign_in: sign_in
101506
+ }),
101507
+ _useState4 = _slicedToArray(_useState3, 2),
101508
+ resolvedLinks = _useState4[0],
101509
+ setResolvedLinks = _useState4[1];
101510
+ (0,external_react_.useEffect)(function () {
101511
+ setResolvedLinks({
101512
+ sign_up: sign_up,
101513
+ sign_in: sign_in
101514
+ });
101515
+ }, [sign_up, sign_in]);
101516
+ (0,external_react_.useEffect)(function () {
101517
+ var canceled = false;
101518
+ var canResolve = typeof (authService === null || authService === void 0 ? void 0 : authService.getAuthLinks) === "function";
101519
+ if (!canResolve) return undefined;
101520
+ SignUpOrSignIn_hooks_asyncToGenerator(/*#__PURE__*/SignUpOrSignIn_hooks_regenerator().m(function _callee() {
101521
+ var links, _t;
101522
+ return SignUpOrSignIn_hooks_regenerator().w(function (_context) {
101523
+ while (1) switch (_context.p = _context.n) {
101524
+ case 0:
101525
+ _context.p = 0;
101526
+ _context.n = 1;
101527
+ return authService.getAuthLinks();
101528
+ case 1:
101529
+ links = _context.v;
101530
+ if (!canceled && links) {
101531
+ setResolvedLinks(mergeAuthLinksFromService(links, sign_up, sign_in));
101532
+ }
101533
+ _context.n = 3;
101534
+ break;
101535
+ case 2:
101536
+ _context.p = 2;
101537
+ _t = _context.v;
101538
+ case 3:
101539
+ return _context.a(2);
101540
+ }
101541
+ }, _callee, null, [[0, 2]]);
101542
+ }))();
101543
+ return function () {
101544
+ canceled = true;
101545
+ };
101546
+ }, [authService, sign_in, sign_up]);
101547
+ return resolvedLinks;
101548
+ }
101549
+ function useEscapeToCloseModal(isModalOpen, setIsModalOpen) {
101550
+ (0,external_react_.useEffect)(function () {
101551
+ var _globalThis$window;
101552
+ if (!isModalOpen) return undefined;
101553
+ var onKeyDown = function onKeyDown(e) {
101554
+ if (e.key !== "Escape") return;
101555
+ setIsModalOpen(false);
101556
+ };
101557
+ (_globalThis$window = globalThis.window) === null || _globalThis$window === void 0 || _globalThis$window.addEventListener("keydown", onKeyDown);
101558
+ return function () {
101559
+ var _globalThis$window2;
101560
+ return (_globalThis$window2 = globalThis.window) === null || _globalThis$window2 === void 0 ? void 0 : _globalThis$window2.removeEventListener("keydown", onKeyDown);
101561
+ };
101562
+ }, [isModalOpen, setIsModalOpen]);
101563
+ }
101409
101564
  ;// ./src/components/signup-signin/SignUpOrSignIn.styled.jsx
101410
101565
 
101411
101566
  function SignUpOrSignIn_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)."; }
101412
101567
  var MOBILE_MAX_WIDTH_PX = 1024;
101413
101568
  var SignUpOrSignInRoot = /*#__PURE__*/createStyled("div", true ? {
101414
101569
  target: "ehh9sxh17"
101415
- } : 0)("--signin-text:#5f5f5f;--signin-hover-bg:#efefef;--signin-focus:#007bff;--signin-font:Lora,sans-serif;--signin-link-size:16px;--signin-link-weight:400;display:inline-flex;align-items:center;gap:0;border-radius:24px;padding:0;font-family:var(--signin-font);color:var(--signin-text);@media (min-width: ", MOBILE_MAX_WIDTH_PX + 1, "px){height:31px;&:hover{background:var(--signin-hover-bg);}}.icon-container{line-height:1;font-size:0;}" + ( true ? "" : 0));
101570
+ } : 0)("--signin-text:#5f5f5f;--signin-hover-bg:#efefef;--signin-focus:#007bff;--signin-font:Lora,sans-serif;--signin-link-size:16px;--signin-link-weight:400;display:inline-flex;align-items:center;gap:0;border-radius:24px;padding:0;font-family:var(--signin-font);color:var(--signin-text);padding:4px 8px 4px 5px;@media (min-width: ", MOBILE_MAX_WIDTH_PX + 1, "px){height:31px;&:hover{background:var(--signin-hover-bg);}}.icon-container{line-height:1;font-size:0;}" + ( true ? "" : 0));
101416
101571
  var SignTextLink = /*#__PURE__*/createStyled("span", true ? {
101417
101572
  target: "ehh9sxh16"
101418
101573
  } : 0)("color:var(--signin-text);text-decoration:none;white-space:nowrap;cursor:pointer;font-size:16px;line-height:22px;@media (min-width: ", MOBILE_MAX_WIDTH_PX + 1, "px){text-underline-offset:2px;text-decoration-thickness:1px;}&:focus-visible{outline:1px solid var(--signin-focus);outline-offset:1px;}" + ( true ? "" : 0));
101419
101574
  var SignUpLink = /*#__PURE__*/createStyled("button", true ? {
101420
101575
  target: "ehh9sxh15"
101421
- } : 0)("&&{color:var(--signin-text);text-decoration:none;white-space:nowrap;appearance:none;border:0;background:transparent;font-family:var(--signin-font);font-size:var(--signin-link-size);font-weight:var(--signin-link-weight);line-height:22px;padding:0;text-align:left;cursor:pointer;}&:focus-visible{outline:1px solid var(--signin-focus);outline-offset:1px;}@media (max-width: ", MOBILE_MAX_WIDTH_PX, "px){display:none;}@media (min-width: ", MOBILE_MAX_WIDTH_PX + 1, "px){display:inline-flex;align-items:center;margin:0 4px;&:hover,&:focus-visible{text-decoration:underline;}}" + ( true ? "" : 0));
101576
+ } : 0)("&&{color:var(--signin-text);text-decoration:none;white-space:nowrap;appearance:none;border:0;background:transparent;font-family:var(--signin-font);font-size:var(--signin-link-size);font-weight:var(--signin-link-weight);line-height:22px;padding:0;text-align:left;cursor:pointer;}&:focus-visible{outline:1px solid var(--signin-focus);outline-offset:1px;}@media (max-width: ", MOBILE_MAX_WIDTH_PX, "px){display:none;}@media (min-width: ", MOBILE_MAX_WIDTH_PX + 1, "px){display:inline-flex;align-items:center;margin:0;&:hover,&:focus-visible{text-decoration:underline;}}" + ( true ? "" : 0));
101422
101577
  var SignInLink = /*#__PURE__*/createStyled("button", true ? {
101423
101578
  target: "ehh9sxh14"
101424
101579
  } : 0)("&&{color:var(--signin-text);text-decoration:none;white-space:nowrap;appearance:none;border:0;background:transparent;font-family:var(--signin-font);font-size:var(--signin-link-size);font-weight:var(--signin-link-weight);line-height:22px;padding:0;text-align:left;cursor:pointer;}@media (min-width: ", MOBILE_MAX_WIDTH_PX + 1, "px){display:inline-flex;align-items:center;color:var(--signin-text);padding:1px 4px;text-underline-offset:2px;text-decoration-thickness:1px;}&:focus-visible{outline:1px solid var(--signin-focus);outline-offset:1px;}@media (min-width: ", MOBILE_MAX_WIDTH_PX + 1, "px){&:hover,&:focus-visible{text-decoration:underline;}}" + ( true ? "" : 0));
101425
101580
  var Divider = /*#__PURE__*/createStyled("span", true ? {
101426
101581
  target: "ehh9sxh13"
101427
- } : 0)("color:var(--signin-text);@media (max-width: ", MOBILE_MAX_WIDTH_PX, "px){display:none;}@media (min-width: ", MOBILE_MAX_WIDTH_PX + 1, "px){display:inline-flex;align-items:center;padding:0 4px;font-size:16px;line-height:1;}" + ( true ? "" : 0));
101582
+ } : 0)("color:var(--signin-text);@media (max-width: ", MOBILE_MAX_WIDTH_PX, "px){display:none;}@media (min-width: ", MOBILE_MAX_WIDTH_PX + 1, "px){display:inline-flex;align-items:center;padding:0 6px;font-size:20px;line-height:1;}" + ( true ? "" : 0));
101428
101583
  var IconWrap = /*#__PURE__*/createStyled("span", true ? {
101429
101584
  target: "ehh9sxh12"
101430
101585
  } : 0)("display:inline-flex;align-items:center;justify-content:center;line-height:0;font-size:0;margin-right:4px;@media (max-width: ", MOBILE_MAX_WIDTH_PX, "px){display:none;}" + ( true ? "" : 0));
@@ -101498,37 +101653,20 @@ function SignUpOrSignIn_objectSpread(e) { for (var r = 1; r < arguments.length;
101498
101653
  function SignUpOrSignIn_defineProperty(e, r, t) { return (r = SignUpOrSignIn_toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
101499
101654
  function SignUpOrSignIn_toPropertyKey(t) { var i = SignUpOrSignIn_toPrimitive(t, "string"); return "symbol" == SignUpOrSignIn_typeof(i) ? i : i + ""; }
101500
101655
  function SignUpOrSignIn_toPrimitive(t, r) { if ("object" != SignUpOrSignIn_typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != SignUpOrSignIn_typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
101501
- function SignUpOrSignIn_regenerator() { /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */ var e, t, r = "function" == typeof Symbol ? Symbol : {}, n = r.iterator || "@@iterator", o = r.toStringTag || "@@toStringTag"; function i(r, n, o, i) { var c = n && n.prototype instanceof Generator ? n : Generator, u = Object.create(c.prototype); return SignUpOrSignIn_regeneratorDefine2(u, "_invoke", function (r, n, o) { var i, c, u, f = 0, p = o || [], y = !1, G = { p: 0, n: 0, v: e, a: d, f: d.bind(e, 4), d: function d(t, r) { return i = t, c = 0, u = e, G.n = r, a; } }; function d(r, n) { for (c = r, u = n, t = 0; !y && f && !o && t < p.length; t++) { var o, i = p[t], d = G.p, l = i[2]; r > 3 ? (o = l === n) && (u = i[(c = i[4]) ? 5 : (c = 3, 3)], i[4] = i[5] = e) : i[0] <= d && ((o = r < 2 && d < i[1]) ? (c = 0, G.v = n, G.n = i[1]) : d < l && (o = r < 3 || i[0] > n || n > l) && (i[4] = r, i[5] = n, G.n = l, c = 0)); } if (o || r > 1) return a; throw y = !0, n; } return function (o, p, l) { if (f > 1) throw TypeError("Generator is already running"); for (y && 1 === p && d(p, l), c = p, u = l; (t = c < 2 ? e : u) || !y;) { i || (c ? c < 3 ? (c > 1 && (G.n = -1), d(c, u)) : G.n = u : G.v = u); try { if (f = 2, i) { if (c || (o = "next"), t = i[o]) { if (!(t = t.call(i, u))) throw TypeError("iterator result is not an object"); if (!t.done) return t; u = t.value, c < 2 && (c = 0); } else 1 === c && (t = i["return"]) && t.call(i), c < 2 && (u = TypeError("The iterator does not provide a '" + o + "' method"), c = 1); i = e; } else if ((t = (y = G.n < 0) ? u : r.call(n, G)) !== a) break; } catch (t) { i = e, c = 1, u = t; } finally { f = 1; } } return { value: t, done: y }; }; }(r, o, i), !0), u; } var a = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} t = Object.getPrototypeOf; var c = [][n] ? t(t([][n]())) : (SignUpOrSignIn_regeneratorDefine2(t = {}, n, function () { return this; }), t), u = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(c); function f(e) { return Object.setPrototypeOf ? Object.setPrototypeOf(e, GeneratorFunctionPrototype) : (e.__proto__ = GeneratorFunctionPrototype, SignUpOrSignIn_regeneratorDefine2(e, o, "GeneratorFunction")), e.prototype = Object.create(u), e; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, SignUpOrSignIn_regeneratorDefine2(u, "constructor", GeneratorFunctionPrototype), SignUpOrSignIn_regeneratorDefine2(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = "GeneratorFunction", SignUpOrSignIn_regeneratorDefine2(GeneratorFunctionPrototype, o, "GeneratorFunction"), SignUpOrSignIn_regeneratorDefine2(u), SignUpOrSignIn_regeneratorDefine2(u, o, "Generator"), SignUpOrSignIn_regeneratorDefine2(u, n, function () { return this; }), SignUpOrSignIn_regeneratorDefine2(u, "toString", function () { return "[object Generator]"; }), (SignUpOrSignIn_regenerator = function _regenerator() { return { w: i, m: f }; })(); }
101502
- function SignUpOrSignIn_regeneratorDefine2(e, r, n, t) { var i = Object.defineProperty; try { i({}, "", {}); } catch (e) { i = 0; } SignUpOrSignIn_regeneratorDefine2 = function _regeneratorDefine(e, r, n, t) { function o(r, n) { SignUpOrSignIn_regeneratorDefine2(e, r, function (e) { return this._invoke(r, n, e); }); } r ? i ? i(e, r, { value: n, enumerable: !t, configurable: !t, writable: !t }) : e[r] = n : (o("next", 0), o("throw", 1), o("return", 2)); }, SignUpOrSignIn_regeneratorDefine2(e, r, n, t); }
101503
- function SignUpOrSignIn_asyncGeneratorStep(n, t, e, r, o, a, c) { try { var i = n[a](c), u = i.value; } catch (n) { return void e(n); } i.done ? t(u) : Promise.resolve(u).then(r, o); }
101504
- function SignUpOrSignIn_asyncToGenerator(n) { return function () { var t = this, e = arguments; return new Promise(function (r, o) { var a = n.apply(t, e); function _next(n) { SignUpOrSignIn_asyncGeneratorStep(a, r, o, _next, _throw, "next", n); } function _throw(n) { SignUpOrSignIn_asyncGeneratorStep(a, r, o, _next, _throw, "throw", n); } _next(void 0); }); }; }
101505
- function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || SignUpOrSignIn_unsupportedIterableToArray(r, e) || _nonIterableRest(); }
101506
- function _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."); }
101656
+ function SignUpOrSignIn_slicedToArray(r, e) { return SignUpOrSignIn_arrayWithHoles(r) || SignUpOrSignIn_iterableToArrayLimit(r, e) || SignUpOrSignIn_unsupportedIterableToArray(r, e) || SignUpOrSignIn_nonIterableRest(); }
101657
+ function SignUpOrSignIn_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."); }
101507
101658
  function SignUpOrSignIn_unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return SignUpOrSignIn_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) ? SignUpOrSignIn_arrayLikeToArray(r, a) : void 0; } }
101508
101659
  function SignUpOrSignIn_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; }
101509
- function _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; } }
101510
- function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
101660
+ function SignUpOrSignIn_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; } }
101661
+ function SignUpOrSignIn_arrayWithHoles(r) { if (Array.isArray(r)) return r; }
101662
+
101663
+
101511
101664
 
101512
101665
 
101513
101666
 
101514
101667
 
101515
101668
 
101516
101669
 
101517
- var DEFAULT_SIGN_UP = {
101518
- title: "Sign Up",
101519
- url: ""
101520
- };
101521
- var DEFAULT_SIGN_IN = {
101522
- title: "Sign In",
101523
- url: ""
101524
- };
101525
- var DEFAULT_ICON = "userOutline";
101526
- var ALLOWED_ICON_NAMES = new Set(["userOutline", "userIcon"]);
101527
- var ICON_COLOR_MAP = {
101528
- black: "#000000",
101529
- white: "#ffffff",
101530
- grey: "#808080"
101531
- };
101532
101670
  var DEFAULT_MODAL_COPY = {
101533
101671
  close_dialog_aria_label: "Close dialog",
101534
101672
  sign_in_heading: "Sign In",
@@ -101539,20 +101677,7 @@ var DEFAULT_MODAL_COPY = {
101539
101677
  sign_up_cta_label: "Create Account",
101540
101678
  sign_up_cta_aria_label: "Create Account"
101541
101679
  };
101542
- function navigateToUrl(url) {
101543
- var _globalThis$window;
101544
- var resolvedUrl = String(url !== null && url !== void 0 ? url : "").trim();
101545
- if (!resolvedUrl) return;
101546
- (_globalThis$window = globalThis.window) === null || _globalThis$window === void 0 || (_globalThis$window = _globalThis$window.location) === null || _globalThis$window === void 0 || _globalThis$window.assign(resolvedUrl);
101547
- }
101548
- function handleKeyboardActivate(event) {
101549
- if (event.key !== "Enter" && event.key !== " ") return;
101550
- if (!event.currentTarget.matches(":focus-visible")) return;
101551
- event.preventDefault();
101552
- event.currentTarget.click();
101553
- }
101554
101680
  function SignUpOrSignIn(_ref) {
101555
- var _sign_up$title, _sign_in$title, _effectiveSignUp$titl, _effectiveSignIn$titl, _parent$$icon, _parent$$icon_color, _parent$$sign_up_labe, _parent$$sign_in_labe;
101556
101681
  var _ref$show = _ref.show,
101557
101682
  show = _ref$show === void 0 ? true : _ref$show,
101558
101683
  _ref$icon = _ref.icon,
@@ -101568,114 +101693,42 @@ function SignUpOrSignIn(_ref) {
101568
101693
  authService = _ref$authService === void 0 ? undefined : _ref$authService,
101569
101694
  _ref$parent$ = _ref.parent$,
101570
101695
  parent$ = _ref$parent$ === void 0 ? undefined : _ref$parent$;
101696
+ var isMobile = useIsMobileViewport();
101571
101697
  var _useState = (0,external_react_.useState)(false),
101572
- _useState2 = _slicedToArray(_useState, 2),
101573
- isMobile = _useState2[0],
101574
- setIsMobile = _useState2[1];
101575
- var _useState3 = (0,external_react_.useState)(false),
101576
- _useState4 = _slicedToArray(_useState3, 2),
101577
- isModalOpen = _useState4[0],
101578
- setIsModalOpen = _useState4[1];
101579
- var _useState5 = (0,external_react_.useState)({
101580
- sign_up: sign_up,
101581
- sign_in: sign_in
101582
- }),
101583
- _useState6 = _slicedToArray(_useState5, 2),
101584
- resolvedLinks = _useState6[0],
101585
- setResolvedLinks = _useState6[1];
101698
+ _useState2 = SignUpOrSignIn_slicedToArray(_useState, 2),
101699
+ isModalOpen = _useState2[0],
101700
+ setIsModalOpen = _useState2[1];
101701
+ var resolvedLinks = useResolvedAuthLinks(sign_up, sign_in, authService);
101586
101702
  var editing = isEditingMode();
101587
- (0,external_react_.useEffect)(function () {
101588
- var browserWindow = globalThis.window;
101589
- if (!(browserWindow !== null && browserWindow !== void 0 && browserWindow.matchMedia)) return undefined;
101590
- var mediaQuery = browserWindow.matchMedia("(max-width: 1024px)");
101591
- var sync = function sync() {
101592
- return setIsMobile(mediaQuery.matches);
101593
- };
101594
- sync();
101595
- mediaQuery.addEventListener("change", sync);
101596
- return function () {
101597
- return mediaQuery.removeEventListener("change", sync);
101598
- };
101599
- }, []);
101600
- var signUpTitle = (_sign_up$title = sign_up === null || sign_up === void 0 ? void 0 : sign_up.title) !== null && _sign_up$title !== void 0 ? _sign_up$title : "Sign Up";
101601
- var signInTitle = (_sign_in$title = sign_in === null || sign_in === void 0 ? void 0 : sign_in.title) !== null && _sign_in$title !== void 0 ? _sign_in$title : "Sign In";
101602
- var effectiveSignUp = (resolvedLinks === null || resolvedLinks === void 0 ? void 0 : resolvedLinks.sign_up) || sign_up;
101603
- var effectiveSignIn = (resolvedLinks === null || resolvedLinks === void 0 ? void 0 : resolvedLinks.sign_in) || sign_in;
101604
- var effectiveSignUpTitle = (_effectiveSignUp$titl = effectiveSignUp === null || effectiveSignUp === void 0 ? void 0 : effectiveSignUp.title) !== null && _effectiveSignUp$titl !== void 0 ? _effectiveSignUp$titl : signUpTitle;
101605
- var effectiveSignInTitle = (_effectiveSignIn$titl = effectiveSignIn === null || effectiveSignIn === void 0 ? void 0 : effectiveSignIn.title) !== null && _effectiveSignIn$titl !== void 0 ? _effectiveSignIn$titl : signInTitle;
101606
- var normalizedIconName = String(icon !== null && icon !== void 0 ? icon : DEFAULT_ICON).trim();
101607
- var resolvedIconName = ALLOWED_ICON_NAMES.has(normalizedIconName) ? normalizedIconName : DEFAULT_ICON;
101608
- var normalizedColorName = String(icon_color !== null && icon_color !== void 0 ? icon_color : "").trim().toLowerCase();
101609
- var resolvedIconColor = ICON_COLOR_MAP[normalizedColorName];
101610
- (0,external_react_.useEffect)(function () {
101611
- setResolvedLinks({
101612
- sign_up: sign_up,
101613
- sign_in: sign_in
101614
- });
101615
- }, [sign_up, sign_in]);
101616
- (0,external_react_.useEffect)(function () {
101617
- var canceled = false;
101618
- var canResolve = typeof (authService === null || authService === void 0 ? void 0 : authService.getAuthLinks) === "function";
101619
- if (!canResolve) return undefined;
101620
- SignUpOrSignIn_asyncToGenerator(/*#__PURE__*/SignUpOrSignIn_regenerator().m(function _callee() {
101621
- var links, _t;
101622
- return SignUpOrSignIn_regenerator().w(function (_context) {
101623
- while (1) switch (_context.p = _context.n) {
101624
- case 0:
101625
- _context.p = 0;
101626
- _context.n = 1;
101627
- return authService.getAuthLinks();
101628
- case 1:
101629
- links = _context.v;
101630
- if (!canceled && links) {
101631
- setResolvedLinks({
101632
- sign_up: links.sign_up || links.signUp || sign_up,
101633
- sign_in: links.sign_in || links.signIn || sign_in
101634
- });
101635
- }
101636
- _context.n = 3;
101637
- break;
101638
- case 2:
101639
- _context.p = 2;
101640
- _t = _context.v;
101641
- case 3:
101642
- return _context.a(2);
101643
- }
101644
- }, _callee, null, [[0, 2]]);
101645
- }))();
101646
- return function () {
101647
- canceled = true;
101648
- };
101649
- }, [authService, sign_in, sign_up]);
101650
- (0,external_react_.useEffect)(function () {
101651
- var _globalThis$window2;
101652
- if (!isModalOpen) return undefined;
101653
- var onKeyDown = function onKeyDown(e) {
101654
- if (e.key !== "Escape") return;
101655
- setIsModalOpen(false);
101656
- };
101657
- (_globalThis$window2 = globalThis.window) === null || _globalThis$window2 === void 0 || _globalThis$window2.addEventListener("keydown", onKeyDown);
101658
- return function () {
101659
- var _globalThis$window3;
101660
- return (_globalThis$window3 = globalThis.window) === null || _globalThis$window3 === void 0 ? void 0 : _globalThis$window3.removeEventListener("keydown", onKeyDown);
101661
- };
101662
- }, [isModalOpen]);
101703
+ var _getEffectiveAuthDisp = getEffectiveAuthDisplay(resolvedLinks, sign_up, sign_in),
101704
+ effectiveSignUp = _getEffectiveAuthDisp.effectiveSignUp,
101705
+ effectiveSignIn = _getEffectiveAuthDisp.effectiveSignIn,
101706
+ effectiveSignUpTitle = _getEffectiveAuthDisp.effectiveSignUpTitle,
101707
+ effectiveSignInTitle = _getEffectiveAuthDisp.effectiveSignInTitle;
101708
+ var _getIconPresentation = getIconPresentation(icon, icon_color),
101709
+ resolvedIconName = _getIconPresentation.resolvedIconName,
101710
+ resolvedIconColor = _getIconPresentation.resolvedIconColor;
101711
+ var closeModal = function closeModal() {
101712
+ return setIsModalOpen(false);
101713
+ };
101714
+ var showMobileModal = isMobile && isModalOpen;
101715
+ useEscapeToCloseModal(isModalOpen, setIsModalOpen);
101663
101716
  if (!show) return null;
101664
101717
  return /*#__PURE__*/(0,jsx_runtime_.jsxs)(SignUpOrSignInRoot, {
101665
101718
  "data-testid": "signup-signin",
101666
101719
  children: [!isMobile ? /*#__PURE__*/(0,jsx_runtime_.jsxs)(jsx_runtime_.Fragment, {
101667
- children: [/*#__PURE__*/(0,jsx_runtime_.jsxs)(SignUpLink, {
101720
+ children: [/*#__PURE__*/(0,jsx_runtime_.jsxs)(SignUpLink, SignUpOrSignIn_objectSpread(SignUpOrSignIn_objectSpread({
101668
101721
  "data-testid": "signup-link",
101669
101722
  "aria-label": effectiveSignUpTitle,
101670
- type: "button",
101723
+ type: "button"
101724
+ }, parentEditableProps(parent$, "sign_up_url")), {}, {
101671
101725
  onClick: function onClick() {
101672
- if (editing) return;
101673
- navigateToUrl(effectiveSignUp === null || effectiveSignUp === void 0 ? void 0 : effectiveSignUp.url);
101726
+ return handleSignUpNavigate(editing, effectiveSignUp === null || effectiveSignUp === void 0 ? void 0 : effectiveSignUp.url);
101674
101727
  },
101675
101728
  onKeyDown: handleKeyboardActivate,
101676
- children: [/*#__PURE__*/(0,jsx_runtime_.jsx)("div", SignUpOrSignIn_objectSpread(SignUpOrSignIn_objectSpread({}, (_parent$$icon = parent$ === null || parent$ === void 0 ? void 0 : parent$.icon) !== null && _parent$$icon !== void 0 ? _parent$$icon : {}), {}, {
101729
+ children: [/*#__PURE__*/(0,jsx_runtime_.jsx)("div", SignUpOrSignIn_objectSpread(SignUpOrSignIn_objectSpread({}, parentEditableProps(parent$, "icon")), {}, {
101677
101730
  className: "icon-container",
101678
- children: /*#__PURE__*/(0,jsx_runtime_.jsx)(IconWrap, SignUpOrSignIn_objectSpread(SignUpOrSignIn_objectSpread({}, (_parent$$icon_color = parent$ === null || parent$ === void 0 ? void 0 : parent$.icon_color) !== null && _parent$$icon_color !== void 0 ? _parent$$icon_color : {}), {}, {
101731
+ children: /*#__PURE__*/(0,jsx_runtime_.jsx)(IconWrap, SignUpOrSignIn_objectSpread(SignUpOrSignIn_objectSpread({}, parentEditableProps(parent$, "icon_color")), {}, {
101679
101732
  "aria-hidden": true,
101680
101733
  children: /*#__PURE__*/(0,jsx_runtime_.jsx)(dist.NsIcon, {
101681
101734
  name: resolvedIconName,
@@ -101685,34 +101738,28 @@ function SignUpOrSignIn(_ref) {
101685
101738
  }))
101686
101739
  })), /*#__PURE__*/(0,jsx_runtime_.jsx)(SignTextLink, SignUpOrSignIn_objectSpread(SignUpOrSignIn_objectSpread({
101687
101740
  as: "span"
101688
- }, (_parent$$sign_up_labe = parent$ === null || parent$ === void 0 ? void 0 : parent$.sign_up_label) !== null && _parent$$sign_up_labe !== void 0 ? _parent$$sign_up_labe : {}), {}, {
101741
+ }, parentEditableProps(parent$, "sign_up")), {}, {
101689
101742
  children: effectiveSignUpTitle
101690
101743
  }))]
101691
- }), /*#__PURE__*/(0,jsx_runtime_.jsx)(Divider, {
101744
+ })), /*#__PURE__*/(0,jsx_runtime_.jsx)(Divider, {
101692
101745
  "aria-hidden": true,
101693
101746
  children: "/"
101694
101747
  })]
101695
- }) : null, /*#__PURE__*/(0,jsx_runtime_.jsx)(SignInLink, {
101748
+ }) : null, /*#__PURE__*/(0,jsx_runtime_.jsx)(SignInLink, SignUpOrSignIn_objectSpread(SignUpOrSignIn_objectSpread({
101696
101749
  "data-testid": "signin-button",
101697
- "aria-label": effectiveSignInTitle,
101750
+ "aria-label": effectiveSignInTitle
101751
+ }, parentEditableProps(parent$, "sign_in_url")), {}, {
101698
101752
  onClick: function onClick() {
101699
- if (editing) return;
101700
- if (isMobile) {
101701
- setIsModalOpen(true);
101702
- return;
101703
- }
101704
- navigateToUrl(effectiveSignIn === null || effectiveSignIn === void 0 ? void 0 : effectiveSignIn.url);
101753
+ return handleSignInActivate(editing, isMobile, setIsModalOpen, effectiveSignIn === null || effectiveSignIn === void 0 ? void 0 : effectiveSignIn.url);
101705
101754
  },
101706
101755
  onKeyDown: handleKeyboardActivate,
101707
101756
  type: "button",
101708
- children: /*#__PURE__*/(0,jsx_runtime_.jsx)("span", SignUpOrSignIn_objectSpread(SignUpOrSignIn_objectSpread({}, (_parent$$sign_in_labe = parent$ === null || parent$ === void 0 ? void 0 : parent$.sign_in_label) !== null && _parent$$sign_in_labe !== void 0 ? _parent$$sign_in_labe : {}), {}, {
101757
+ children: /*#__PURE__*/(0,jsx_runtime_.jsx)("span", SignUpOrSignIn_objectSpread(SignUpOrSignIn_objectSpread({}, parentEditableProps(parent$, "sign_in")), {}, {
101709
101758
  children: effectiveSignInTitle
101710
101759
  }))
101711
- }), isMobile && isModalOpen ? /*#__PURE__*/(0,jsx_runtime_.jsx)(MobileAuthModalBackdrop, {
101760
+ })), showMobileModal ? /*#__PURE__*/(0,jsx_runtime_.jsx)(MobileAuthModalBackdrop, {
101712
101761
  "data-testid": "signin-modal-backdrop",
101713
- onClick: function onClick() {
101714
- return setIsModalOpen(false);
101715
- },
101762
+ onClick: closeModal,
101716
101763
  children: /*#__PURE__*/(0,jsx_runtime_.jsxs)(MobileAuthModal, {
101717
101764
  open: true,
101718
101765
  "aria-modal": "true",
@@ -101725,9 +101772,7 @@ function SignUpOrSignIn(_ref) {
101725
101772
  "data-testid": "signin-modal-cancel",
101726
101773
  "aria-label": modal_copy === null || modal_copy === void 0 ? void 0 : modal_copy.close_dialog_aria_label,
101727
101774
  type: "button",
101728
- onClick: function onClick() {
101729
- return setIsModalOpen(false);
101730
- },
101775
+ onClick: closeModal,
101731
101776
  children: "\xD7"
101732
101777
  })
101733
101778
  }), /*#__PURE__*/(0,jsx_runtime_.jsx)(ModalContent, {
@@ -101741,9 +101786,7 @@ function SignUpOrSignIn(_ref) {
101741
101786
  type: "button",
101742
101787
  "data-testid": "signin-modal-signin-cta",
101743
101788
  onClick: function onClick() {
101744
- if (editing) return;
101745
- setIsModalOpen(false);
101746
- navigateToUrl(effectiveSignIn === null || effectiveSignIn === void 0 ? void 0 : effectiveSignIn.url);
101789
+ return handleModalAuthNavigate(editing, closeModal, effectiveSignIn === null || effectiveSignIn === void 0 ? void 0 : effectiveSignIn.url);
101747
101790
  },
101748
101791
  children: modal_copy === null || modal_copy === void 0 ? void 0 : modal_copy.sign_in_cta_label
101749
101792
  })]
@@ -101756,9 +101799,7 @@ function SignUpOrSignIn(_ref) {
101756
101799
  "data-testid": "signin-modal-create-account-cta",
101757
101800
  type: "button",
101758
101801
  onClick: function onClick() {
101759
- if (editing) return;
101760
- setIsModalOpen(false);
101761
- navigateToUrl(effectiveSignUp === null || effectiveSignUp === void 0 ? void 0 : effectiveSignUp.url);
101802
+ return handleModalAuthNavigate(editing, closeModal, effectiveSignUp === null || effectiveSignUp === void 0 ? void 0 : effectiveSignUp.url);
101762
101803
  },
101763
101804
  "aria-label": modal_copy === null || modal_copy === void 0 ? void 0 : modal_copy.sign_up_cta_aria_label,
101764
101805
  children: modal_copy === null || modal_copy === void 0 ? void 0 : modal_copy.sign_up_cta_label
@@ -101798,8 +101839,10 @@ SignUpOrSignIn.propTypes = {
101798
101839
  parent$: external_prop_types_default().shape({
101799
101840
  icon: (external_prop_types_default()).object,
101800
101841
  icon_color: (external_prop_types_default()).object,
101801
- sign_up_label: (external_prop_types_default()).object,
101802
- sign_in_label: (external_prop_types_default()).object
101842
+ sign_up: (external_prop_types_default()).object,
101843
+ sign_up_url: (external_prop_types_default()).object,
101844
+ sign_in: (external_prop_types_default()).object,
101845
+ sign_in_url: (external_prop_types_default()).object
101803
101846
  })
101804
101847
  };
101805
101848
  ;// ./src/components/header/regions/HeaderAccountRegion.jsx
@@ -101838,8 +101881,10 @@ HeaderAccountRegion.propTypes = {
101838
101881
  parent$: external_prop_types_default().shape({
101839
101882
  icon: (external_prop_types_default()).object,
101840
101883
  icon_color: (external_prop_types_default()).object,
101841
- sign_up_label: (external_prop_types_default()).object,
101842
- sign_in_label: (external_prop_types_default()).object
101884
+ sign_up: (external_prop_types_default()).object,
101885
+ sign_up_url: (external_prop_types_default()).object,
101886
+ sign_in: (external_prop_types_default()).object,
101887
+ sign_in_url: (external_prop_types_default()).object
101843
101888
  })
101844
101889
  };
101845
101890
  ;// ./src/components/cart/Cart.styled.jsx
@@ -101943,8 +101988,6 @@ HeaderCartRegion.defaultProps = {
101943
101988
  };
101944
101989
  // EXTERNAL MODULE: ./node_modules/@mui/icons-material/Close.js
101945
101990
  var Close = __webpack_require__(9781);
101946
- // EXTERNAL MODULE: ./node_modules/@mui/icons-material/Search.js
101947
- var Search = __webpack_require__(4745);
101948
101991
  ;// ./src/components/input/Input.constants.js
101949
101992
  var INPUT_ICON_POSITIONS = {
101950
101993
  START: "start",
@@ -102254,8 +102297,11 @@ function Input(props) {
102254
102297
  "aria-hidden": "true",
102255
102298
  "data-testid": iconTestId,
102256
102299
  $size: normalizedSize,
102257
- children: /*#__PURE__*/(0,jsx_runtime_.jsx)(Search/* default */.A, {
102258
- fontSize: "inherit"
102300
+ children: /*#__PURE__*/(0,jsx_runtime_.jsx)(dist.NsIcon, {
102301
+ name: "search",
102302
+ size: "medium",
102303
+ colorOverride: "currentColor",
102304
+ "aria-hidden": true
102259
102305
  })
102260
102306
  });
102261
102307
  var inputEl = /*#__PURE__*/(0,jsx_runtime_.jsx)(TextInput, {
@@ -102971,10 +103017,12 @@ function AutoCompleteSearchField(_ref) {
102971
103017
  "aria-label": "Search",
102972
103018
  "data-testid": "autocomplete-search-button"
102973
103019
  }, autoCompleteSearchIconTag !== null && autoCompleteSearchIconTag !== void 0 ? autoCompleteSearchIconTag : {}), {}, {
102974
- children: /*#__PURE__*/(0,jsx_runtime_.jsx)(Search/* default */.A, {
102975
- fontSize: "inherit",
102976
- "aria-hidden": true,
102977
- "data-testid": "autocomplete-search-icon"
103020
+ children: /*#__PURE__*/(0,jsx_runtime_.jsx)(dist.NsIcon, {
103021
+ name: "search",
103022
+ size: "medium",
103023
+ testId: "autocomplete-search-icon",
103024
+ colorOverride: "currentColor",
103025
+ "aria-hidden": true
102978
103026
  })
102979
103027
  })), /*#__PURE__*/(0,jsx_runtime_.jsx)("input", AutoCompleteSearchField_objectSpread(AutoCompleteSearchField_objectSpread({
102980
103028
  ref: inputRef,
@@ -103975,7 +104023,7 @@ var ModalOverlay = /*#__PURE__*/createStyled("div", true ? {
103975
104023
  } : 0);
103976
104024
  var ModalPanel = /*#__PURE__*/createStyled("dialog", true ? {
103977
104025
  target: "etuykaq7"
103978
- } : 0)("box-sizing:border-box;background:", SearchModal_styled_colors.surface, ";width:100%;flex:1;min-height:100%;padding:12px 16px;display:flex;flex-direction:column;gap:12px;box-shadow:0 4px 24px rgba(0, 0, 0, 0.08);border:none;margin:0;max-width:none;max-height:none;@media (max-width: 767px){padding:12px 0;}@media (min-width: 768px) and (max-width: 1023px){padding:12px 0 35px;}@media (min-width: 1024px){flex:0 0 auto;min-height:unset;padding:12px clamp(12px, 4vw, 32px) 35px;}" + ( true ? "" : 0));
104026
+ } : 0)("box-sizing:border-box;background:", SearchModal_styled_colors.surface, ";width:100%;flex:1;min-height:100%;padding:12px 16px;display:flex;flex-direction:column;gap:30px;box-shadow:0 4px 24px rgba(0, 0, 0, 0.08);border:none;margin:0;max-width:none;max-height:none;@media (max-width: 767px){padding:30px 0;}@media (min-width: 768px) and (max-width: 1023px){padding:30px 0 35px;}@media (min-width: 1024px){flex:0 0 auto;min-height:unset;padding:20px clamp(12px, 4vw, 32px) 45px;}" + ( true ? "" : 0));
103979
104027
  var ModalTopBar = /*#__PURE__*/createStyled("div", true ? {
103980
104028
  target: "etuykaq6"
103981
104029
  } : 0)( true ? {
@@ -104050,7 +104098,6 @@ function SearchModal_toPrimitive(t, r) { if ("object" != SearchModal_typeof(t) |
104050
104098
 
104051
104099
 
104052
104100
 
104053
-
104054
104101
  function getFocusableElementsInPanel(panel) {
104055
104102
  if (!panel) return [];
104056
104103
  return Array.from(panel.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])')).filter(function (el) {
@@ -104108,10 +104155,12 @@ function renderMobileTrigger(_ref2) {
104108
104155
  "aria-expanded": isOpen,
104109
104156
  onClick: openModal,
104110
104157
  "data-testid": "search-modal-trigger-mobile",
104111
- children: /*#__PURE__*/(0,jsx_runtime_.jsx)(Search/* default */.A, {
104112
- fontSize: "inherit",
104113
- "aria-hidden": true,
104114
- "data-testid": "search"
104158
+ children: /*#__PURE__*/(0,jsx_runtime_.jsx)(dist.NsIcon, {
104159
+ name: "search",
104160
+ size: "large",
104161
+ testId: "search",
104162
+ colorOverride: "currentColor",
104163
+ "aria-hidden": true
104115
104164
  })
104116
104165
  });
104117
104166
  }
@@ -104140,10 +104189,12 @@ function renderDesktopTrigger(_ref3) {
104140
104189
  children: [/*#__PURE__*/(0,jsx_runtime_.jsx)(DesktopTriggerIconButton, SearchModal_objectSpread(SearchModal_objectSpread({
104141
104190
  "data-testid": "search-trigger-button"
104142
104191
  }, (_activeEditableTags$t = activeEditableTags === null || activeEditableTags === void 0 ? void 0 : activeEditableTags.triggerIcon) !== null && _activeEditableTags$t !== void 0 ? _activeEditableTags$t : {}), {}, {
104143
- children: /*#__PURE__*/(0,jsx_runtime_.jsx)(Search/* default */.A, {
104144
- fontSize: "inherit",
104145
- "aria-hidden": true,
104146
- "data-testid": "search"
104192
+ children: /*#__PURE__*/(0,jsx_runtime_.jsx)(dist.NsIcon, {
104193
+ name: "search",
104194
+ size: "large",
104195
+ testId: "search",
104196
+ colorOverride: "currentColor",
104197
+ "aria-hidden": true
104147
104198
  })
104148
104199
  })), /*#__PURE__*/(0,jsx_runtime_.jsx)(DesktopTriggerInput, SearchModal_objectSpread(SearchModal_objectSpread({
104149
104200
  "data-testid": "search-trigger-input"
@@ -104162,13 +104213,6 @@ function SearchModal(_ref4) {
104162
104213
  onSearch = _ref4$onSearch === void 0 ? function () {} : _ref4$onSearch,
104163
104214
  _ref4$modalTitle = _ref4.modalTitle,
104164
104215
  modalTitle = _ref4$modalTitle === void 0 ? MODAL_TITLE : _ref4$modalTitle,
104165
- brandLogo = _ref4.brandLogo,
104166
- brandLogoAlt = _ref4.brandLogoAlt,
104167
- brandHref = _ref4.brandHref,
104168
- _ref4$brandSize = _ref4.brandSize,
104169
- brandSize = _ref4$brandSize === void 0 ? "Medium" : _ref4$brandSize,
104170
- _ref4$showBrandLogo = _ref4.showBrandLogo,
104171
- showBrandLogo = _ref4$showBrandLogo === void 0 ? true : _ref4$showBrandLogo,
104172
104216
  _ref4$cancelLabel = _ref4.cancelLabel,
104173
104217
  cancelLabel = _ref4$cancelLabel === void 0 ? "Cancel" : _ref4$cancelLabel,
104174
104218
  _ref4$cancelShowIcon = _ref4.cancelShowIcon,
@@ -104187,6 +104231,8 @@ function SearchModal(_ref4) {
104187
104231
  clearAllLabel = _ref4$clearAllLabel === void 0 ? "Clear all" : _ref4$clearAllLabel,
104188
104232
  _ref4$parent$ = _ref4.parent$,
104189
104233
  parent$ = _ref4$parent$ === void 0 ? undefined : _ref4$parent$,
104234
+ _ref4$logo = _ref4.logo,
104235
+ logo = _ref4$logo === void 0 ? undefined : _ref4$logo,
104190
104236
  _ref4$inputSize = _ref4.inputSize,
104191
104237
  inputSize = _ref4$inputSize === void 0 ? DEFAULT_INPUT_SIZE : _ref4$inputSize,
104192
104238
  _ref4$inputSizeVarian = _ref4.inputSizeVariant,
@@ -104195,7 +104241,6 @@ function SearchModal(_ref4) {
104195
104241
  showMobileTrigger = _ref4$showMobileTrigg === void 0 ? true : _ref4$showMobileTrigg,
104196
104242
  _ref4$showDesktopTrig = _ref4.showDesktopTrigger,
104197
104243
  showDesktopTrigger = _ref4$showDesktopTrig === void 0 ? true : _ref4$showDesktopTrig;
104198
- var editing = isEditingMode();
104199
104244
  var activeEditableTags = parent$;
104200
104245
  var _useState = (0,external_react_.useState)(false),
104201
104246
  _useState2 = SearchModal_slicedToArray(_useState, 2),
@@ -104361,18 +104406,13 @@ function SearchModal(_ref4) {
104361
104406
  children: [/*#__PURE__*/(0,jsx_runtime_.jsx)(SearchModal_styled_LogoSlot, {
104362
104407
  "data-testid": "search-modal-logo-slot",
104363
104408
  children: /*#__PURE__*/(0,jsx_runtime_.jsx)(Brand, {
104364
- logo: brandLogo,
104365
- logoAlt: brandLogoAlt,
104366
- href: brandHref,
104367
- size: brandSize,
104368
- showLogo: showBrandLogo,
104369
- $: {
104370
- header_logo: activeEditableTags === null || activeEditableTags === void 0 ? void 0 : activeEditableTags.logoAsset,
104371
- logo_url: activeEditableTags === null || activeEditableTags === void 0 ? void 0 : activeEditableTags.logoUrl,
104372
- show_logo: activeEditableTags === null || activeEditableTags === void 0 ? void 0 : activeEditableTags.showBrandLogo,
104373
- logo_size: activeEditableTags === null || activeEditableTags === void 0 ? void 0 : activeEditableTags.brandSize
104374
- },
104375
- isEditing: editing
104409
+ "data-testid": "search-modal-logo",
104410
+ logo: logo === null || logo === void 0 ? void 0 : logo.logo,
104411
+ logoAlt: logo === null || logo === void 0 ? void 0 : logo.logoAlt,
104412
+ href: logo === null || logo === void 0 ? void 0 : logo.href,
104413
+ showLogo: logo === null || logo === void 0 ? void 0 : logo.showLogo,
104414
+ size: logo === null || logo === void 0 ? void 0 : logo.size,
104415
+ $: logo === null || logo === void 0 ? void 0 : logo.$
104376
104416
  })
104377
104417
  }), /*#__PURE__*/(0,jsx_runtime_.jsx)("span", SearchModal_objectSpread(SearchModal_objectSpread({
104378
104418
  onPointerDown: function onPointerDown() {
@@ -104399,11 +104439,6 @@ SearchModal.propTypes = {
104399
104439
  searchPlaceholder: (external_prop_types_default()).string,
104400
104440
  onSearch: (external_prop_types_default()).func,
104401
104441
  modalTitle: (external_prop_types_default()).string,
104402
- brandLogo: (external_prop_types_default()).string,
104403
- brandLogoAlt: (external_prop_types_default()).string,
104404
- brandHref: (external_prop_types_default()).string,
104405
- brandSize: external_prop_types_default().oneOf(["Small", "Medium", "Large"]),
104406
- showBrandLogo: (external_prop_types_default()).bool,
104407
104442
  cancelLabel: (external_prop_types_default()).string,
104408
104443
  cancelShowIcon: (external_prop_types_default()).bool,
104409
104444
  headerSearchService: autoCompleteHeaderSearchServiceShape,
@@ -104413,6 +104448,14 @@ SearchModal.propTypes = {
104413
104448
  recentSearchesHeading: (external_prop_types_default()).string,
104414
104449
  clearAllLabel: (external_prop_types_default()).string,
104415
104450
  parent$: (external_prop_types_default()).object,
104451
+ logo: external_prop_types_default().shape({
104452
+ logo: (external_prop_types_default()).string,
104453
+ logoAlt: (external_prop_types_default()).string,
104454
+ href: (external_prop_types_default()).string,
104455
+ showLogo: (external_prop_types_default()).bool,
104456
+ size: external_prop_types_default().oneOf(["Small", "Medium", "Large"]),
104457
+ $: (external_prop_types_default()).object
104458
+ }),
104416
104459
  inputSize: external_prop_types_default().oneOf([INPUT_SIZES.SM, INPUT_SIZES.MD, INPUT_SIZES.LG]),
104417
104460
  inputSizeVariant: external_prop_types_default().oneOf([INPUT_SIZE_VARIANTS.DEFAULT, INPUT_SIZE_VARIANTS.WIDE, INPUT_SIZE_VARIANTS.FULL]),
104418
104461
  showMobileTrigger: (external_prop_types_default()).bool,
@@ -104974,6 +105017,7 @@ function HeaderSearchRegion(_ref) {
104974
105017
  language = _ref.language,
104975
105018
  locale = _ref.locale,
104976
105019
  searchConfig = _ref.searchConfig,
105020
+ logo = _ref.logo,
104977
105021
  showMobileTrigger = _ref.showMobileTrigger,
104978
105022
  showDesktopTrigger = _ref.showDesktopTrigger;
104979
105023
  var headerSearchService = (0,external_react_.useMemo)(function () {
@@ -105036,11 +105080,7 @@ function HeaderSearchRegion(_ref) {
105036
105080
  return headerSearchService.submitProductSearch(query);
105037
105081
  },
105038
105082
  modalTitle: searchConfig === null || searchConfig === void 0 ? void 0 : searchConfig.modalTitle,
105039
- brandLogo: searchConfig === null || searchConfig === void 0 ? void 0 : searchConfig.brandLogo,
105040
- brandLogoAlt: searchConfig === null || searchConfig === void 0 ? void 0 : searchConfig.brandLogoAlt,
105041
- brandHref: searchConfig === null || searchConfig === void 0 ? void 0 : searchConfig.brandHref,
105042
- brandSize: searchConfig === null || searchConfig === void 0 ? void 0 : searchConfig.brandSize,
105043
- showBrandLogo: searchConfig === null || searchConfig === void 0 ? void 0 : searchConfig.showBrandLogo,
105083
+ logo: logo,
105044
105084
  cancelLabel: searchConfig === null || searchConfig === void 0 ? void 0 : searchConfig.cancelLabel,
105045
105085
  cancelShowIcon: searchConfig === null || searchConfig === void 0 ? void 0 : searchConfig.cancelShowIcon,
105046
105086
  showRecentSearches: (_searchConfig$recentS = searchConfig === null || searchConfig === void 0 ? void 0 : searchConfig.recentSearchesEnabled) !== null && _searchConfig$recentS !== void 0 ? _searchConfig$recentS : true,
@@ -105060,6 +105100,14 @@ HeaderSearchRegion.propTypes = {
105060
105100
  language: (external_prop_types_default()).string.isRequired,
105061
105101
  locale: (external_prop_types_default()).string.isRequired,
105062
105102
  searchConfig: (external_prop_types_default()).object,
105103
+ logo: external_prop_types_default().shape({
105104
+ logo: (external_prop_types_default()).string,
105105
+ logoAlt: (external_prop_types_default()).string,
105106
+ href: (external_prop_types_default()).string,
105107
+ showLogo: (external_prop_types_default()).bool,
105108
+ size: external_prop_types_default().oneOf(["Small", "Medium", "Large"]),
105109
+ $: (external_prop_types_default()).object
105110
+ }),
105063
105111
  showMobileTrigger: (external_prop_types_default()).bool,
105064
105112
  showDesktopTrigger: (external_prop_types_default()).bool
105065
105113
  };
@@ -107388,6 +107436,11 @@ function MarketSelector_arrayWithHoles(r) { if (Array.isArray(r)) return r; }
107388
107436
 
107389
107437
  var REMEMBER_KEY = "marketSelectorRemember";
107390
107438
  var SELECTION_KEY = "marketSelectorSelection";
107439
+
107440
+ /** True when running in SSR (no browser `window`). */
107441
+ function isServerEnvironment() {
107442
+ return globalThis.window === undefined;
107443
+ }
107391
107444
  function collectMarketsWithParentRegions(regions) {
107392
107445
  return (regions !== null && regions !== void 0 ? regions : []).flatMap(function (region) {
107393
107446
  var _region$countries;
@@ -108109,6 +108162,10 @@ function shouldForceDrawerTriggerRemount(drawerPortal, isMobileViewport, wasOpen
108109
108162
  function runMobileLocaleRowNavigation(_x) {
108110
108163
  return _runMobileLocaleRowNavigation.apply(this, arguments);
108111
108164
  }
108165
+ /**
108166
+ * SSR: only the trigger pill is emitted (desktop pill, no modal markup). Full behavior runs after
108167
+ * hydration. First client paint uses the same trigger as SSR until `isClientMounted` flips.
108168
+ */
108112
108169
  function _runMobileLocaleRowNavigation() {
108113
108170
  _runMobileLocaleRowNavigation = MarketSelector_asyncToGenerator(/*#__PURE__*/MarketSelector_regenerator().m(function _callee2(_ref10) {
108114
108171
  var event, row, applySelection, resolveLocalePath, resolved, _t;
@@ -108201,6 +108258,11 @@ function MarketSelector(_ref11) {
108201
108258
  _useState14 = MarketSelector_slicedToArray(_useState13, 2),
108202
108259
  isRememberHovered = _useState14[0],
108203
108260
  setIsRememberHovered = _useState14[1];
108261
+ /** After first client paint, align trigger (desktop vs mobile) with `matchMedia`; false until then matches SSR output for hydration. */
108262
+ var _useState15 = (0,external_react_.useState)(false),
108263
+ _useState16 = MarketSelector_slicedToArray(_useState15, 2),
108264
+ isClientMounted = _useState16[0],
108265
+ setIsClientMounted = _useState16[1];
108204
108266
  var text = (0,external_react_.useMemo)(function () {
108205
108267
  return resolveMarketSelectorText(selector);
108206
108268
  }, [selector === null || selector === void 0 ? void 0 : selector.select_your_market_language_text, selector === null || selector === void 0 ? void 0 : selector.remember_region_text, selector === null || selector === void 0 ? void 0 : selector.cancel_text]);
@@ -108227,8 +108289,11 @@ function MarketSelector(_ref11) {
108227
108289
  (0,external_react_.useEffect)(function () {
108228
108290
  setSessionPillDisplay(null);
108229
108291
  }, [effectivePageLocale]);
108292
+ (0,external_react_.useEffect)(function () {
108293
+ setIsClientMounted(true);
108294
+ }, []);
108230
108295
  var drawerPortal = mobileTriggerMode === "drawerPortal";
108231
- (0,external_react_.useLayoutEffect)(function () {
108296
+ (0,external_react_.useEffect)(function () {
108232
108297
  var wasOpen = prevDrawerOpenRef.current;
108233
108298
  var nowOpen = drawerOpen;
108234
108299
  prevDrawerOpenRef.current = nowOpen;
@@ -108319,8 +108384,10 @@ function MarketSelector(_ref11) {
108319
108384
  "aria-hidden": true
108320
108385
  })]
108321
108386
  }));
108387
+ var isSsr = isServerEnvironment();
108388
+ var triggerViewport = isClientMounted ? isMobileViewport : false;
108322
108389
  var triggerElement = resolveMarketSelectorTriggerElement({
108323
- isMobileViewport: isMobileViewport,
108390
+ isMobileViewport: triggerViewport,
108324
108391
  drawerPortal: drawerPortal,
108325
108392
  drawerOpen: drawerOpen,
108326
108393
  drawerTriggerMountRef: drawerTriggerMountRef,
@@ -108349,14 +108416,17 @@ function MarketSelector(_ref11) {
108349
108416
  resolveLocalePath: resolveLocalePath,
108350
108417
  onMobileLocaleRowActivate: handleMobileLocaleRowActivate
108351
108418
  };
108352
- var modalElement = isMobileViewport ? renderMarketSelectorModalMobile(MarketSelector_objectSpread(MarketSelector_objectSpread({}, modalShared), {}, {
108353
- localeRows: localeRows,
108354
- mobileScrollContentRef: mobileScrollContentRef
108355
- })) : renderMarketSelectorModalDesktop(MarketSelector_objectSpread(MarketSelector_objectSpread({}, modalShared), {}, {
108356
- logo: logo
108357
- }));
108419
+ var modalElement = null;
108420
+ if (!isSsr) {
108421
+ modalElement = isMobileViewport ? renderMarketSelectorModalMobile(MarketSelector_objectSpread(MarketSelector_objectSpread({}, modalShared), {}, {
108422
+ localeRows: localeRows,
108423
+ mobileScrollContentRef: mobileScrollContentRef
108424
+ })) : renderMarketSelectorModalDesktop(MarketSelector_objectSpread(MarketSelector_objectSpread({}, modalShared), {}, {
108425
+ logo: logo
108426
+ }));
108427
+ }
108358
108428
  return /*#__PURE__*/(0,jsx_runtime_.jsxs)(MarketSelectorRoot, {
108359
- "data-drawer-portal-host": drawerPortal && isMobileViewport ? "true" : undefined,
108429
+ "data-drawer-portal-host": drawerPortal && triggerViewport ? "true" : undefined,
108360
108430
  children: [triggerElement, modalElement]
108361
108431
  });
108362
108432
  }
@@ -108440,8 +108510,9 @@ var DEFAULT_ACCOUNT = {
108440
108510
  }
108441
108511
  };
108442
108512
  var DEFAULT_CART = {
108443
- aria_label: "Shopping cart",
108444
- count: 0
108513
+ show_cart_icon: false,
108514
+ show_cart_count: false,
108515
+ item_count: 0
108445
108516
  };
108446
108517
  var DEFAULT_NAVIGATION = {
108447
108518
  topNavItems: [{
@@ -108527,8 +108598,14 @@ function pickUtilityLinksEntry(utilityLinksEntries) {
108527
108598
  return entry === null || entry === void 0 ? void 0 : entry.sign_up_sign_in_component;
108528
108599
  }) || utilityLinksEntries[0] || null;
108529
108600
  }
108601
+ function pickAuthTextField(authData, fieldKey) {
108602
+ var value = authData === null || authData === void 0 ? void 0 : authData[fieldKey];
108603
+ if (typeof value !== "string") return undefined;
108604
+ var trimmed = value.trim();
108605
+ return trimmed || undefined;
108606
+ }
108530
108607
  function buildAccountData(_ref) {
108531
- var _firstDefined, _firstDefined2, _firstDefined3, _utilityAuthData$sign, _legacyAccountData$si, _legacyAccountData$si2, _firstDefined4, _utilityAuthData$sign2, _legacyAccountData$si3, _legacyAccountData$si4, _firstDefined5, _utilityAuthData$sign3, _legacyAccountData$si5, _legacyAccountData$si6, _firstDefined6, _utilityAuthData$sign4, _legacyAccountData$si7, _legacyAccountData$si8;
108608
+ var _firstDefined, _firstDefined2, _firstDefined3, _firstDefined4, _firstDefined5, _firstDefined6;
108532
108609
  var utilityAuthData = _ref.utilityAuthData,
108533
108610
  legacyAccountData = _ref.legacyAccountData;
108534
108611
  return {
@@ -108536,29 +108613,36 @@ function buildAccountData(_ref) {
108536
108613
  icon: (_firstDefined = firstDefined(utilityAuthData === null || utilityAuthData === void 0 ? void 0 : utilityAuthData.icon, legacyAccountData === null || legacyAccountData === void 0 ? void 0 : legacyAccountData.icon)) !== null && _firstDefined !== void 0 ? _firstDefined : DEFAULT_ACCOUNT.icon,
108537
108614
  icon_color: (_firstDefined2 = firstDefined(utilityAuthData === null || utilityAuthData === void 0 ? void 0 : utilityAuthData.icon_color, utilityAuthData === null || utilityAuthData === void 0 ? void 0 : utilityAuthData.iconColor, legacyAccountData === null || legacyAccountData === void 0 ? void 0 : legacyAccountData.icon_color, legacyAccountData === null || legacyAccountData === void 0 ? void 0 : legacyAccountData.iconColor)) !== null && _firstDefined2 !== void 0 ? _firstDefined2 : DEFAULT_ACCOUNT.icon_color,
108538
108615
  sign_up: {
108539
- title: (_firstDefined3 = firstDefined(utilityAuthData === null || utilityAuthData === void 0 || (_utilityAuthData$sign = utilityAuthData.sign_up) === null || _utilityAuthData$sign === void 0 ? void 0 : _utilityAuthData$sign.title, legacyAccountData === null || legacyAccountData === void 0 ? void 0 : legacyAccountData.sign_up_label, legacyAccountData === null || legacyAccountData === void 0 || (_legacyAccountData$si = legacyAccountData.signUp) === null || _legacyAccountData$si === void 0 ? void 0 : _legacyAccountData$si.title, legacyAccountData === null || legacyAccountData === void 0 || (_legacyAccountData$si2 = legacyAccountData.sign_up) === null || _legacyAccountData$si2 === void 0 ? void 0 : _legacyAccountData$si2.title)) !== null && _firstDefined3 !== void 0 ? _firstDefined3 : DEFAULT_ACCOUNT.sign_up.title,
108540
- url: (_firstDefined4 = firstDefined(utilityAuthData === null || utilityAuthData === void 0 || (_utilityAuthData$sign2 = utilityAuthData.sign_up) === null || _utilityAuthData$sign2 === void 0 ? void 0 : _utilityAuthData$sign2.href, legacyAccountData === null || legacyAccountData === void 0 ? void 0 : legacyAccountData.sign_up_url, legacyAccountData === null || legacyAccountData === void 0 || (_legacyAccountData$si3 = legacyAccountData.signUp) === null || _legacyAccountData$si3 === void 0 ? void 0 : _legacyAccountData$si3.url, legacyAccountData === null || legacyAccountData === void 0 || (_legacyAccountData$si4 = legacyAccountData.sign_up) === null || _legacyAccountData$si4 === void 0 ? void 0 : _legacyAccountData$si4.url)) !== null && _firstDefined4 !== void 0 ? _firstDefined4 : DEFAULT_ACCOUNT.sign_up.url
108616
+ title: (_firstDefined3 = firstDefined(pickAuthTextField(utilityAuthData, "sign_up"), legacyAccountData === null || legacyAccountData === void 0 ? void 0 : legacyAccountData.sign_up_label)) !== null && _firstDefined3 !== void 0 ? _firstDefined3 : DEFAULT_ACCOUNT.sign_up.title,
108617
+ url: (_firstDefined4 = firstDefined(pickAuthTextField(utilityAuthData, "sign_up_url"), legacyAccountData === null || legacyAccountData === void 0 ? void 0 : legacyAccountData.sign_up_url)) !== null && _firstDefined4 !== void 0 ? _firstDefined4 : DEFAULT_ACCOUNT.sign_up.url
108541
108618
  },
108542
108619
  sign_in: {
108543
- title: (_firstDefined5 = firstDefined(utilityAuthData === null || utilityAuthData === void 0 || (_utilityAuthData$sign3 = utilityAuthData.sign_in) === null || _utilityAuthData$sign3 === void 0 ? void 0 : _utilityAuthData$sign3.title, legacyAccountData === null || legacyAccountData === void 0 ? void 0 : legacyAccountData.sign_in_label, legacyAccountData === null || legacyAccountData === void 0 || (_legacyAccountData$si5 = legacyAccountData.signIn) === null || _legacyAccountData$si5 === void 0 ? void 0 : _legacyAccountData$si5.title, legacyAccountData === null || legacyAccountData === void 0 || (_legacyAccountData$si6 = legacyAccountData.sign_in) === null || _legacyAccountData$si6 === void 0 ? void 0 : _legacyAccountData$si6.title)) !== null && _firstDefined5 !== void 0 ? _firstDefined5 : DEFAULT_ACCOUNT.sign_in.title,
108544
- url: (_firstDefined6 = firstDefined(utilityAuthData === null || utilityAuthData === void 0 || (_utilityAuthData$sign4 = utilityAuthData.sign_in) === null || _utilityAuthData$sign4 === void 0 ? void 0 : _utilityAuthData$sign4.href, legacyAccountData === null || legacyAccountData === void 0 ? void 0 : legacyAccountData.sign_in_url, legacyAccountData === null || legacyAccountData === void 0 || (_legacyAccountData$si7 = legacyAccountData.signIn) === null || _legacyAccountData$si7 === void 0 ? void 0 : _legacyAccountData$si7.url, legacyAccountData === null || legacyAccountData === void 0 || (_legacyAccountData$si8 = legacyAccountData.sign_in) === null || _legacyAccountData$si8 === void 0 ? void 0 : _legacyAccountData$si8.url)) !== null && _firstDefined6 !== void 0 ? _firstDefined6 : DEFAULT_ACCOUNT.sign_in.url
108620
+ title: (_firstDefined5 = firstDefined(pickAuthTextField(utilityAuthData, "sign_in"), legacyAccountData === null || legacyAccountData === void 0 ? void 0 : legacyAccountData.sign_in_label)) !== null && _firstDefined5 !== void 0 ? _firstDefined5 : DEFAULT_ACCOUNT.sign_in.title,
108621
+ url: (_firstDefined6 = firstDefined(pickAuthTextField(utilityAuthData, "sign_in_url"), legacyAccountData === null || legacyAccountData === void 0 ? void 0 : legacyAccountData.sign_in_url)) !== null && _firstDefined6 !== void 0 ? _firstDefined6 : DEFAULT_ACCOUNT.sign_in.url
108545
108622
  }
108546
108623
  };
108547
108624
  }
108548
108625
  function buildAccountParentTags(_ref2) {
108549
- var _utilityAuthData$$, _utilityLinksEntry$$, _legacyAccountData$$, _utilityAuthData$$2, _utilityAuthData$$3, _utilityLinksEntry$$2, _utilityLinksEntry$$3, _legacyAccountData$$2, _legacyAccountData$$3, _utilityAuthData$sign5, _utilityLinksEntry$$4, _legacyAccountData$$4, _utilityAuthData$sign6, _utilityLinksEntry$$5, _legacyAccountData$$5;
108626
+ var _utilityLinksEntry$$, _utilityLinksEntry$$2, _legacyAccountData$$, _legacyAccountData$$2, _legacyAccountData$$3;
108550
108627
  var utilityAuthData = _ref2.utilityAuthData,
108551
108628
  utilityLinksEntry = _ref2.utilityLinksEntry,
108552
108629
  legacyAccountData = _ref2.legacyAccountData;
108630
+ var refTags = (utilityLinksEntry === null || utilityLinksEntry === void 0 || (_utilityLinksEntry$$ = utilityLinksEntry.$) === null || _utilityLinksEntry$$ === void 0 ? void 0 : _utilityLinksEntry$$.sign_up_sign_in_component) || (utilityLinksEntry === null || utilityLinksEntry === void 0 || (_utilityLinksEntry$$2 = utilityLinksEntry.$) === null || _utilityLinksEntry$$2 === void 0 ? void 0 : _utilityLinksEntry$$2.sign_up_sign_in_component__0);
108631
+ var pickTag = function pickTag(key) {
108632
+ var _utilityAuthData$$;
108633
+ return (utilityAuthData === null || utilityAuthData === void 0 || (_utilityAuthData$$ = utilityAuthData.$) === null || _utilityAuthData$$ === void 0 ? void 0 : _utilityAuthData$$[key]) || (refTags === null || refTags === void 0 ? void 0 : refTags[key]);
108634
+ };
108553
108635
  return {
108554
- icon: (utilityAuthData === null || utilityAuthData === void 0 || (_utilityAuthData$$ = utilityAuthData.$) === null || _utilityAuthData$$ === void 0 ? void 0 : _utilityAuthData$$.icon) || (utilityLinksEntry === null || utilityLinksEntry === void 0 || (_utilityLinksEntry$$ = utilityLinksEntry.$) === null || _utilityLinksEntry$$ === void 0 || (_utilityLinksEntry$$ = _utilityLinksEntry$$.sign_up_sign_in_component) === null || _utilityLinksEntry$$ === void 0 ? void 0 : _utilityLinksEntry$$.icon) || (legacyAccountData === null || legacyAccountData === void 0 || (_legacyAccountData$$ = legacyAccountData.$) === null || _legacyAccountData$$ === void 0 ? void 0 : _legacyAccountData$$.icon),
108555
- icon_color: (utilityAuthData === null || utilityAuthData === void 0 || (_utilityAuthData$$2 = utilityAuthData.$) === null || _utilityAuthData$$2 === void 0 ? void 0 : _utilityAuthData$$2.icon_color) || (utilityAuthData === null || utilityAuthData === void 0 || (_utilityAuthData$$3 = utilityAuthData.$) === null || _utilityAuthData$$3 === void 0 ? void 0 : _utilityAuthData$$3.iconColor) || (utilityLinksEntry === null || utilityLinksEntry === void 0 || (_utilityLinksEntry$$2 = utilityLinksEntry.$) === null || _utilityLinksEntry$$2 === void 0 || (_utilityLinksEntry$$2 = _utilityLinksEntry$$2.sign_up_sign_in_component) === null || _utilityLinksEntry$$2 === void 0 ? void 0 : _utilityLinksEntry$$2.icon_color) || (utilityLinksEntry === null || utilityLinksEntry === void 0 || (_utilityLinksEntry$$3 = utilityLinksEntry.$) === null || _utilityLinksEntry$$3 === void 0 || (_utilityLinksEntry$$3 = _utilityLinksEntry$$3.sign_up_sign_in_component) === null || _utilityLinksEntry$$3 === void 0 ? void 0 : _utilityLinksEntry$$3.iconColor) || (legacyAccountData === null || legacyAccountData === void 0 || (_legacyAccountData$$2 = legacyAccountData.$) === null || _legacyAccountData$$2 === void 0 ? void 0 : _legacyAccountData$$2.icon_color) || (legacyAccountData === null || legacyAccountData === void 0 || (_legacyAccountData$$3 = legacyAccountData.$) === null || _legacyAccountData$$3 === void 0 ? void 0 : _legacyAccountData$$3.iconColor),
108556
- sign_up_label: (utilityAuthData === null || utilityAuthData === void 0 || (_utilityAuthData$sign5 = utilityAuthData.sign_up) === null || _utilityAuthData$sign5 === void 0 || (_utilityAuthData$sign5 = _utilityAuthData$sign5.$) === null || _utilityAuthData$sign5 === void 0 ? void 0 : _utilityAuthData$sign5.title) || (utilityLinksEntry === null || utilityLinksEntry === void 0 || (_utilityLinksEntry$$4 = utilityLinksEntry.$) === null || _utilityLinksEntry$$4 === void 0 || (_utilityLinksEntry$$4 = _utilityLinksEntry$$4.sign_up_sign_in_component) === null || _utilityLinksEntry$$4 === void 0 || (_utilityLinksEntry$$4 = _utilityLinksEntry$$4.sign_up) === null || _utilityLinksEntry$$4 === void 0 ? void 0 : _utilityLinksEntry$$4.title) || (legacyAccountData === null || legacyAccountData === void 0 || (_legacyAccountData$$4 = legacyAccountData.$) === null || _legacyAccountData$$4 === void 0 ? void 0 : _legacyAccountData$$4.sign_up_label),
108557
- sign_in_label: (utilityAuthData === null || utilityAuthData === void 0 || (_utilityAuthData$sign6 = utilityAuthData.sign_in) === null || _utilityAuthData$sign6 === void 0 || (_utilityAuthData$sign6 = _utilityAuthData$sign6.$) === null || _utilityAuthData$sign6 === void 0 ? void 0 : _utilityAuthData$sign6.title) || (utilityLinksEntry === null || utilityLinksEntry === void 0 || (_utilityLinksEntry$$5 = utilityLinksEntry.$) === null || _utilityLinksEntry$$5 === void 0 || (_utilityLinksEntry$$5 = _utilityLinksEntry$$5.sign_up_sign_in_component) === null || _utilityLinksEntry$$5 === void 0 || (_utilityLinksEntry$$5 = _utilityLinksEntry$$5.sign_in) === null || _utilityLinksEntry$$5 === void 0 ? void 0 : _utilityLinksEntry$$5.title) || (legacyAccountData === null || legacyAccountData === void 0 || (_legacyAccountData$$5 = legacyAccountData.$) === null || _legacyAccountData$$5 === void 0 ? void 0 : _legacyAccountData$$5.sign_in_label)
108636
+ icon: pickTag("icon") || (legacyAccountData === null || legacyAccountData === void 0 || (_legacyAccountData$$ = legacyAccountData.$) === null || _legacyAccountData$$ === void 0 ? void 0 : _legacyAccountData$$.icon),
108637
+ icon_color: pickTag("icon_color") || pickTag("iconColor") || (legacyAccountData === null || legacyAccountData === void 0 || (_legacyAccountData$$2 = legacyAccountData.$) === null || _legacyAccountData$$2 === void 0 ? void 0 : _legacyAccountData$$2.icon_color) || (legacyAccountData === null || legacyAccountData === void 0 || (_legacyAccountData$$3 = legacyAccountData.$) === null || _legacyAccountData$$3 === void 0 ? void 0 : _legacyAccountData$$3.iconColor),
108638
+ sign_up: pickTag("sign_up"),
108639
+ sign_up_url: pickTag("sign_up_url"),
108640
+ sign_in: pickTag("sign_in"),
108641
+ sign_in_url: pickTag("sign_in_url")
108558
108642
  };
108559
108643
  }
108560
108644
  function HeaderView(_ref3) {
108561
- var _headerEntry$logo, _headerEntry$locale_s, _utilityLinksEntry$lo, _utilityLinksEntry$lo2, _headerEntry$cart, _headerEntry$top_ribb, _headerEntry$navigati, _headerEntry$market_s, _ref4, _headerEntry$locale, _headerEntry$$;
108645
+ var _headerEntry$logo, _headerEntry$locale_s, _utilityLinksEntry$lo, _utilityLinksEntry$lo2, _headerEntry$cart, _headerEntry$top_ribb, _headerEntry$navigati, _headerEntry$market_s, _headerEntry$$, _ref4, _headerEntry$locale, _headerEntry$$2, _headerEntry$$3;
108562
108646
  var country = _ref3.country,
108563
108647
  language = _ref3.language,
108564
108648
  locale = _ref3.locale,
@@ -108624,9 +108708,11 @@ function HeaderView(_ref3) {
108624
108708
  language: language,
108625
108709
  locale: locale,
108626
108710
  searchConfig: searchConfig,
108711
+ logo: logoData,
108627
108712
  showDesktopTrigger: false
108628
108713
  }), /*#__PURE__*/(0,jsx_runtime_.jsx)(HeaderCartRegion, {
108629
- data: cartData
108714
+ data: cartData,
108715
+ parent$: headerEntry === null || headerEntry === void 0 || (_headerEntry$$ = headerEntry.$) === null || _headerEntry$$ === void 0 ? void 0 : _headerEntry$$.cart
108630
108716
  })]
108631
108717
  }), /*#__PURE__*/(0,jsx_runtime_.jsxs)(RightHeaderCluster, {
108632
108718
  children: [/*#__PURE__*/(0,jsx_runtime_.jsxs)(UtilityBar, {
@@ -108635,7 +108721,7 @@ function HeaderView(_ref3) {
108635
108721
  data: marketSelector,
108636
108722
  logo: logoData,
108637
108723
  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(),
108638
- parent$: headerEntry === null || headerEntry === void 0 || (_headerEntry$$ = headerEntry.$) === null || _headerEntry$$ === void 0 ? void 0 : _headerEntry$$.market_selector__0,
108724
+ parent$: headerEntry === null || headerEntry === void 0 || (_headerEntry$$2 = headerEntry.$) === null || _headerEntry$$2 === void 0 ? void 0 : _headerEntry$$2.market_selector__0,
108639
108725
  mobileTriggerMode: "drawerPortal",
108640
108726
  drawerOpen: isMobileMenuOpen,
108641
108727
  drawerTriggerMountRef: mobileMarketTriggerMountRef
@@ -108645,7 +108731,8 @@ function HeaderView(_ref3) {
108645
108731
  data: accountData,
108646
108732
  parent$: accountParentTags
108647
108733
  }), /*#__PURE__*/(0,jsx_runtime_.jsx)(HeaderCartRegion, {
108648
- data: cartData
108734
+ data: cartData,
108735
+ parent$: headerEntry === null || headerEntry === void 0 || (_headerEntry$$3 = headerEntry.$) === null || _headerEntry$$3 === void 0 ? void 0 : _headerEntry$$3.cart
108649
108736
  })]
108650
108737
  }), /*#__PURE__*/(0,jsx_runtime_.jsx)(SearchSlot, {
108651
108738
  children: /*#__PURE__*/(0,jsx_runtime_.jsx)(HeaderSearchRegion, {
@@ -108653,6 +108740,7 @@ function HeaderView(_ref3) {
108653
108740
  language: language,
108654
108741
  locale: locale,
108655
108742
  searchConfig: searchConfig,
108743
+ logo: logoData,
108656
108744
  showMobileTrigger: false
108657
108745
  })
108658
108746
  })]