@nuskin/nextgen-header 1.27.0 → 1.28.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package-dist/index.js +687 -148
- package/package-dist/index.js.map +1 -1
- package/package-dist/index.mjs +687 -147
- package/package-dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/package-dist/index.js
CHANGED
|
@@ -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", "
|
|
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;
|
|
@@ -101242,7 +101221,7 @@ function IconChevronDown(props) {
|
|
|
101242
101221
|
}));
|
|
101243
101222
|
}
|
|
101244
101223
|
function IconUser(props) {
|
|
101245
|
-
return /*#__PURE__*/(
|
|
101224
|
+
return /*#__PURE__*/_jsx("svg", HeaderIcons_objectSpread(HeaderIcons_objectSpread({
|
|
101246
101225
|
width: "18",
|
|
101247
101226
|
height: "18",
|
|
101248
101227
|
viewBox: "0 0 24 24",
|
|
@@ -101250,7 +101229,7 @@ function IconUser(props) {
|
|
|
101250
101229
|
xmlns: "http://www.w3.org/2000/svg",
|
|
101251
101230
|
"aria-hidden": true
|
|
101252
101231
|
}, props), {}, {
|
|
101253
|
-
children: /*#__PURE__*/(
|
|
101232
|
+
children: /*#__PURE__*/_jsx("path", {
|
|
101254
101233
|
d: "M12 12a4 4 0 100-8 4 4 0 000 8zM4 20a8 8 0 0116 0",
|
|
101255
101234
|
stroke: "currentColor",
|
|
101256
101235
|
strokeWidth: "2",
|
|
@@ -101378,30 +101357,6 @@ MobileHeaderDrawer.propTypes = {
|
|
|
101378
101357
|
current: (external_prop_types_default()).any
|
|
101379
101358
|
})
|
|
101380
101359
|
};
|
|
101381
|
-
;// ./src/components/header/regions/HeaderLogoRegion.jsx
|
|
101382
|
-
|
|
101383
|
-
|
|
101384
|
-
|
|
101385
|
-
|
|
101386
|
-
function HeaderLogoRegion(_ref) {
|
|
101387
|
-
var _data$aria_label;
|
|
101388
|
-
var data = _ref.data;
|
|
101389
|
-
return /*#__PURE__*/(0,jsx_runtime_.jsx)("div", {
|
|
101390
|
-
"data-region": "logo",
|
|
101391
|
-
children: /*#__PURE__*/(0,jsx_runtime_.jsx)(WordmarkButton, {
|
|
101392
|
-
type: "button",
|
|
101393
|
-
"aria-label": (_data$aria_label = data.aria_label) !== null && _data$aria_label !== void 0 ? _data$aria_label : "Nu Skin home",
|
|
101394
|
-
children: data.wordmark
|
|
101395
|
-
})
|
|
101396
|
-
});
|
|
101397
|
-
}
|
|
101398
|
-
HeaderLogoRegion.propTypes = {
|
|
101399
|
-
data: external_prop_types_default().shape({
|
|
101400
|
-
wordmark: (external_prop_types_default()).string,
|
|
101401
|
-
home_href: (external_prop_types_default()).string,
|
|
101402
|
-
aria_label: (external_prop_types_default()).string
|
|
101403
|
-
})
|
|
101404
|
-
};
|
|
101405
101360
|
;// ./src/components/header/regions/HeaderLoyaltyRegion.jsx
|
|
101406
101361
|
function HeaderLoyaltyRegion_typeof(o) { "@babel/helpers - typeof"; return HeaderLoyaltyRegion_typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, HeaderLoyaltyRegion_typeof(o); }
|
|
101407
101362
|
function HeaderLoyaltyRegion_ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
@@ -101430,38 +101385,507 @@ HeaderLoyaltyRegion.propTypes = {
|
|
|
101430
101385
|
$: (external_prop_types_default()).object
|
|
101431
101386
|
}).isRequired
|
|
101432
101387
|
};
|
|
101433
|
-
;// ./src/components/
|
|
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; }
|
|
101434
101480
|
|
|
101435
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
|
+
}
|
|
101564
|
+
;// ./src/components/signup-signin/SignUpOrSignIn.styled.jsx
|
|
101565
|
+
|
|
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)."; }
|
|
101567
|
+
var MOBILE_MAX_WIDTH_PX = 1024;
|
|
101568
|
+
var SignUpOrSignInRoot = /*#__PURE__*/createStyled("div", true ? {
|
|
101569
|
+
target: "ehh9sxh17"
|
|
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));
|
|
101571
|
+
var SignTextLink = /*#__PURE__*/createStyled("span", true ? {
|
|
101572
|
+
target: "ehh9sxh16"
|
|
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));
|
|
101574
|
+
var SignUpLink = /*#__PURE__*/createStyled("button", true ? {
|
|
101575
|
+
target: "ehh9sxh15"
|
|
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));
|
|
101577
|
+
var SignInLink = /*#__PURE__*/createStyled("button", true ? {
|
|
101578
|
+
target: "ehh9sxh14"
|
|
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));
|
|
101580
|
+
var Divider = /*#__PURE__*/createStyled("span", true ? {
|
|
101581
|
+
target: "ehh9sxh13"
|
|
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));
|
|
101583
|
+
var IconWrap = /*#__PURE__*/createStyled("span", true ? {
|
|
101584
|
+
target: "ehh9sxh12"
|
|
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));
|
|
101586
|
+
var MobileAuthModalBackdrop = /*#__PURE__*/createStyled("div", true ? {
|
|
101587
|
+
target: "ehh9sxh11"
|
|
101588
|
+
} : 0)("display:none;@media (max-width: ", MOBILE_MAX_WIDTH_PX, "px){display:grid;place-items:center;position:fixed;inset:0;background:rgba(0, 0, 0, 0.45);z-index:1200;padding:12px;overflow-y:auto;}" + ( true ? "" : 0));
|
|
101589
|
+
var MobileAuthModal = /*#__PURE__*/createStyled("dialog", true ? {
|
|
101590
|
+
target: "ehh9sxh10"
|
|
101591
|
+
} : 0)("display:none;border:0;margin:0;@media (max-width: ", MOBILE_MAX_WIDTH_PX, "px){display:flex;flex-direction:column;width:min(90vw, 520px);max-width:100%;background:#ffffff;border-radius:26px;padding:0;gap:0;position:relative;box-shadow:0 10px 28px rgba(0, 0, 0, 0.24);box-sizing:border-box;overflow:hidden;}@media (max-width: 768px){width:min(92vw, 460px);}@media (max-width: 425px){width:calc(100vw - 20px);max-width:none;border-radius:22px;}@media (max-width: 375px){width:calc(100vw - 16px);max-width:none;border-radius:20px;}@media (min-width: 768px) and (max-width: ", MOBILE_MAX_WIDTH_PX, "px){width:min(78vw, 500px);border:1px solid #d8d8d8;}" + ( true ? "" : 0));
|
|
101592
|
+
var ModalHeaderRow = /*#__PURE__*/createStyled("div", true ? {
|
|
101593
|
+
target: "ehh9sxh9"
|
|
101594
|
+
} : 0)( true ? {
|
|
101595
|
+
name: "wbibpl",
|
|
101596
|
+
styles: "display:flex;align-items:flex-start;justify-content:flex-end;width:100%;min-height:44px;padding:12px 18px 0;box-sizing:border-box"
|
|
101597
|
+
} : 0);
|
|
101598
|
+
var ModalTitle = /*#__PURE__*/createStyled("h2", true ? {
|
|
101599
|
+
target: "ehh9sxh8"
|
|
101600
|
+
} : 0)( true ? {
|
|
101601
|
+
name: "1m9bk8n",
|
|
101602
|
+
styles: "margin:0;color:#252525;font-family:var(--signin-font);font-size:22px;line-height:28px;font-weight:400"
|
|
101603
|
+
} : 0);
|
|
101604
|
+
var ModalCancelButton = /*#__PURE__*/createStyled("button", true ? {
|
|
101605
|
+
target: "ehh9sxh7"
|
|
101606
|
+
} : 0)( true ? {
|
|
101607
|
+
name: "u33vv4",
|
|
101608
|
+
styles: "appearance:none;border:0;padding:0;margin:0;background:transparent;color:#8f8f8f;font-family:var(--signin-font);font-size:28px;line-height:24px;font-weight:400;min-width:24px;min-height:24px;cursor:pointer;&:focus-visible{outline:1px solid var(--signin-focus);outline-offset:1px;}"
|
|
101609
|
+
} : 0);
|
|
101610
|
+
var ModalContent = /*#__PURE__*/createStyled("div", true ? {
|
|
101611
|
+
target: "ehh9sxh6"
|
|
101612
|
+
} : 0)( true ? {
|
|
101613
|
+
name: "150yav4",
|
|
101614
|
+
styles: "display:flex;flex-direction:column;width:100%;gap:0;padding:0 26px 26px;box-sizing:border-box;@media (max-width: 425px){padding:0 18px 20px;}"
|
|
101615
|
+
} : 0);
|
|
101616
|
+
var ModalSections = /*#__PURE__*/createStyled("div", true ? {
|
|
101617
|
+
target: "ehh9sxh5"
|
|
101618
|
+
} : 0)( true ? {
|
|
101619
|
+
name: "dbqp8z",
|
|
101620
|
+
styles: "display:flex;flex-direction:column;width:100%;gap:0;box-sizing:border-box"
|
|
101621
|
+
} : 0);
|
|
101622
|
+
var ModalSection = /*#__PURE__*/createStyled("section", true ? {
|
|
101623
|
+
target: "ehh9sxh4"
|
|
101624
|
+
} : 0)( true ? {
|
|
101625
|
+
name: "phcu5u",
|
|
101626
|
+
styles: "padding:6px 0 0;display:flex;flex-direction:column;gap:12px;width:100%;box-sizing:border-box;&:first-of-type{padding-bottom:18px;border-bottom:0.5px solid #252525;margin-bottom:18px;}@media (min-width: 769px){&:first-of-type{border-bottom:0;}}"
|
|
101627
|
+
} : 0);
|
|
101628
|
+
var SectionTitle = /*#__PURE__*/createStyled("h3", true ? {
|
|
101629
|
+
target: "ehh9sxh3"
|
|
101630
|
+
} : 0)( true ? {
|
|
101631
|
+
name: "1kyoijh",
|
|
101632
|
+
styles: "margin:0;color:#252525;font-family:var(--signin-font);font-size:18px;line-height:22px;font-weight:600;text-transform:uppercase"
|
|
101633
|
+
} : 0);
|
|
101634
|
+
var SectionMessage = /*#__PURE__*/createStyled("p", true ? {
|
|
101635
|
+
target: "ehh9sxh2"
|
|
101636
|
+
} : 0)( true ? {
|
|
101637
|
+
name: "18ee69d",
|
|
101638
|
+
styles: "margin:0;color:#000000de;font-family:var(--signin-font);font-size:16px;line-height:22px;font-weight:400;overflow-wrap:anywhere"
|
|
101639
|
+
} : 0);
|
|
101640
|
+
var PrimaryButton = /*#__PURE__*/createStyled("button", true ? {
|
|
101641
|
+
target: "ehh9sxh1"
|
|
101642
|
+
} : 0)("width:100%;min-height:44px;border-radius:4px;border:0;background:#252525;color:#ffffff;font-family:var(--signin-font);font-size:16px;line-height:22px;font-weight:600;cursor:pointer;box-sizing:border-box;&:focus-visible{outline:1px solid var(--signin-focus);outline-offset:1px;}@media (max-width: ", MOBILE_MAX_WIDTH_PX, "px){&:hover{background:#de3d49;}&:active{background:#0d0e0d;}&:focus{outline:2px solid #0d0e0d;outline-offset:2px;background:#;}&:active:focus{box-shadow:0 0 0 0.2rem rgba(69, 69, 69, 0.5);}}" + ( true ? "" : 0));
|
|
101643
|
+
var OutlinedButton = /*#__PURE__*/createStyled("button", true ? {
|
|
101644
|
+
target: "ehh9sxh0"
|
|
101645
|
+
} : 0)( true ? {
|
|
101646
|
+
name: "16bjh6l",
|
|
101647
|
+
styles: "appearance:none;width:100%;min-height:44px;border-radius:4px;border:1px solid #252525;background:#ffffff;color:#252525;font-family:var(--signin-font);font-size:16px;line-height:22px;font-weight:600;display:inline-flex;align-items:center;justify-content:center;text-decoration:none;box-sizing:border-box;&:hover{background:#ffffff;color:#8c8c8c;border:1px solid #8c8c8c;}&:active:focus{color:#5f5f5f;background:#ffffff;border:1px solid #94d6e9;}&:focus-visible{outline:1px solid var(--signin-focus);outline-offset:1px;}"
|
|
101648
|
+
} : 0);
|
|
101649
|
+
;// ./src/components/signup-signin/SignUpOrSignIn.jsx
|
|
101650
|
+
function SignUpOrSignIn_typeof(o) { "@babel/helpers - typeof"; return SignUpOrSignIn_typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, SignUpOrSignIn_typeof(o); }
|
|
101651
|
+
function SignUpOrSignIn_ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
101652
|
+
function SignUpOrSignIn_objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? SignUpOrSignIn_ownKeys(Object(t), !0).forEach(function (r) { SignUpOrSignIn_defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : SignUpOrSignIn_ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
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; }
|
|
101654
|
+
function SignUpOrSignIn_toPropertyKey(t) { var i = SignUpOrSignIn_toPrimitive(t, "string"); return "symbol" == SignUpOrSignIn_typeof(i) ? i : i + ""; }
|
|
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); }
|
|
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."); }
|
|
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; } }
|
|
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; }
|
|
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
|
+
|
|
101664
|
+
|
|
101665
|
+
|
|
101666
|
+
|
|
101667
|
+
|
|
101668
|
+
|
|
101669
|
+
|
|
101670
|
+
var DEFAULT_MODAL_COPY = {
|
|
101671
|
+
close_dialog_aria_label: "Close dialog",
|
|
101672
|
+
sign_in_heading: "Sign In",
|
|
101673
|
+
sign_in_message: "Have an account already? Please sign in.",
|
|
101674
|
+
sign_in_cta_label: "Sign In",
|
|
101675
|
+
sign_up_heading: "Sign Up",
|
|
101676
|
+
sign_up_message: "New user? Please Sign up to continue",
|
|
101677
|
+
sign_up_cta_label: "Create Account",
|
|
101678
|
+
sign_up_cta_aria_label: "Create Account"
|
|
101679
|
+
};
|
|
101680
|
+
function SignUpOrSignIn(_ref) {
|
|
101681
|
+
var _ref$show = _ref.show,
|
|
101682
|
+
show = _ref$show === void 0 ? true : _ref$show,
|
|
101683
|
+
_ref$icon = _ref.icon,
|
|
101684
|
+
icon = _ref$icon === void 0 ? DEFAULT_ICON : _ref$icon,
|
|
101685
|
+
icon_color = _ref.icon_color,
|
|
101686
|
+
_ref$sign_up = _ref.sign_up,
|
|
101687
|
+
sign_up = _ref$sign_up === void 0 ? DEFAULT_SIGN_UP : _ref$sign_up,
|
|
101688
|
+
_ref$sign_in = _ref.sign_in,
|
|
101689
|
+
sign_in = _ref$sign_in === void 0 ? DEFAULT_SIGN_IN : _ref$sign_in,
|
|
101690
|
+
_ref$modal_copy = _ref.modal_copy,
|
|
101691
|
+
modal_copy = _ref$modal_copy === void 0 ? DEFAULT_MODAL_COPY : _ref$modal_copy,
|
|
101692
|
+
_ref$authService = _ref.authService,
|
|
101693
|
+
authService = _ref$authService === void 0 ? undefined : _ref$authService,
|
|
101694
|
+
_ref$parent$ = _ref.parent$,
|
|
101695
|
+
parent$ = _ref$parent$ === void 0 ? undefined : _ref$parent$;
|
|
101696
|
+
var isMobile = useIsMobileViewport();
|
|
101697
|
+
var _useState = (0,external_react_.useState)(false),
|
|
101698
|
+
_useState2 = SignUpOrSignIn_slicedToArray(_useState, 2),
|
|
101699
|
+
isModalOpen = _useState2[0],
|
|
101700
|
+
setIsModalOpen = _useState2[1];
|
|
101701
|
+
var resolvedLinks = useResolvedAuthLinks(sign_up, sign_in, authService);
|
|
101702
|
+
var editing = isEditingMode();
|
|
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);
|
|
101716
|
+
if (!show) return null;
|
|
101717
|
+
return /*#__PURE__*/(0,jsx_runtime_.jsxs)(SignUpOrSignInRoot, {
|
|
101718
|
+
"data-testid": "signup-signin",
|
|
101719
|
+
children: [!isMobile ? /*#__PURE__*/(0,jsx_runtime_.jsxs)(jsx_runtime_.Fragment, {
|
|
101720
|
+
children: [/*#__PURE__*/(0,jsx_runtime_.jsxs)(SignUpLink, SignUpOrSignIn_objectSpread(SignUpOrSignIn_objectSpread({
|
|
101721
|
+
"data-testid": "signup-link",
|
|
101722
|
+
"aria-label": effectiveSignUpTitle,
|
|
101723
|
+
type: "button"
|
|
101724
|
+
}, parentEditableProps(parent$, "sign_up_url")), {}, {
|
|
101725
|
+
onClick: function onClick() {
|
|
101726
|
+
return handleSignUpNavigate(editing, effectiveSignUp === null || effectiveSignUp === void 0 ? void 0 : effectiveSignUp.url);
|
|
101727
|
+
},
|
|
101728
|
+
onKeyDown: handleKeyboardActivate,
|
|
101729
|
+
children: [/*#__PURE__*/(0,jsx_runtime_.jsx)("div", SignUpOrSignIn_objectSpread(SignUpOrSignIn_objectSpread({}, parentEditableProps(parent$, "icon")), {}, {
|
|
101730
|
+
className: "icon-container",
|
|
101731
|
+
children: /*#__PURE__*/(0,jsx_runtime_.jsx)(IconWrap, SignUpOrSignIn_objectSpread(SignUpOrSignIn_objectSpread({}, parentEditableProps(parent$, "icon_color")), {}, {
|
|
101732
|
+
"aria-hidden": true,
|
|
101733
|
+
children: /*#__PURE__*/(0,jsx_runtime_.jsx)(dist.NsIcon, {
|
|
101734
|
+
name: resolvedIconName,
|
|
101735
|
+
size: "large",
|
|
101736
|
+
colorOverride: resolvedIconColor
|
|
101737
|
+
})
|
|
101738
|
+
}))
|
|
101739
|
+
})), /*#__PURE__*/(0,jsx_runtime_.jsx)(SignTextLink, SignUpOrSignIn_objectSpread(SignUpOrSignIn_objectSpread({
|
|
101740
|
+
as: "span"
|
|
101741
|
+
}, parentEditableProps(parent$, "sign_up")), {}, {
|
|
101742
|
+
children: effectiveSignUpTitle
|
|
101743
|
+
}))]
|
|
101744
|
+
})), /*#__PURE__*/(0,jsx_runtime_.jsx)(Divider, {
|
|
101745
|
+
"aria-hidden": true,
|
|
101746
|
+
children: "/"
|
|
101747
|
+
})]
|
|
101748
|
+
}) : null, /*#__PURE__*/(0,jsx_runtime_.jsx)(SignInLink, SignUpOrSignIn_objectSpread(SignUpOrSignIn_objectSpread({
|
|
101749
|
+
"data-testid": "signin-button",
|
|
101750
|
+
"aria-label": effectiveSignInTitle
|
|
101751
|
+
}, parentEditableProps(parent$, "sign_in_url")), {}, {
|
|
101752
|
+
onClick: function onClick() {
|
|
101753
|
+
return handleSignInActivate(editing, isMobile, setIsModalOpen, effectiveSignIn === null || effectiveSignIn === void 0 ? void 0 : effectiveSignIn.url);
|
|
101754
|
+
},
|
|
101755
|
+
onKeyDown: handleKeyboardActivate,
|
|
101756
|
+
type: "button",
|
|
101757
|
+
children: /*#__PURE__*/(0,jsx_runtime_.jsx)("span", SignUpOrSignIn_objectSpread(SignUpOrSignIn_objectSpread({}, parentEditableProps(parent$, "sign_in")), {}, {
|
|
101758
|
+
children: effectiveSignInTitle
|
|
101759
|
+
}))
|
|
101760
|
+
})), showMobileModal ? /*#__PURE__*/(0,jsx_runtime_.jsx)(MobileAuthModalBackdrop, {
|
|
101761
|
+
"data-testid": "signin-modal-backdrop",
|
|
101762
|
+
onClick: closeModal,
|
|
101763
|
+
children: /*#__PURE__*/(0,jsx_runtime_.jsxs)(MobileAuthModal, {
|
|
101764
|
+
open: true,
|
|
101765
|
+
"aria-modal": "true",
|
|
101766
|
+
"aria-label": effectiveSignInTitle,
|
|
101767
|
+
onClick: function onClick(e) {
|
|
101768
|
+
return e.stopPropagation();
|
|
101769
|
+
},
|
|
101770
|
+
children: [/*#__PURE__*/(0,jsx_runtime_.jsx)(ModalHeaderRow, {
|
|
101771
|
+
children: /*#__PURE__*/(0,jsx_runtime_.jsx)(ModalCancelButton, {
|
|
101772
|
+
"data-testid": "signin-modal-cancel",
|
|
101773
|
+
"aria-label": modal_copy === null || modal_copy === void 0 ? void 0 : modal_copy.close_dialog_aria_label,
|
|
101774
|
+
type: "button",
|
|
101775
|
+
onClick: closeModal,
|
|
101776
|
+
children: "\xD7"
|
|
101777
|
+
})
|
|
101778
|
+
}), /*#__PURE__*/(0,jsx_runtime_.jsx)(ModalContent, {
|
|
101779
|
+
children: /*#__PURE__*/(0,jsx_runtime_.jsxs)(ModalSections, {
|
|
101780
|
+
children: [/*#__PURE__*/(0,jsx_runtime_.jsxs)(ModalSection, {
|
|
101781
|
+
children: [/*#__PURE__*/(0,jsx_runtime_.jsx)(SectionTitle, {
|
|
101782
|
+
children: modal_copy === null || modal_copy === void 0 ? void 0 : modal_copy.sign_in_heading
|
|
101783
|
+
}), /*#__PURE__*/(0,jsx_runtime_.jsx)(SectionMessage, {
|
|
101784
|
+
children: modal_copy === null || modal_copy === void 0 ? void 0 : modal_copy.sign_in_message
|
|
101785
|
+
}), /*#__PURE__*/(0,jsx_runtime_.jsx)(PrimaryButton, {
|
|
101786
|
+
type: "button",
|
|
101787
|
+
"data-testid": "signin-modal-signin-cta",
|
|
101788
|
+
onClick: function onClick() {
|
|
101789
|
+
return handleModalAuthNavigate(editing, closeModal, effectiveSignIn === null || effectiveSignIn === void 0 ? void 0 : effectiveSignIn.url);
|
|
101790
|
+
},
|
|
101791
|
+
children: modal_copy === null || modal_copy === void 0 ? void 0 : modal_copy.sign_in_cta_label
|
|
101792
|
+
})]
|
|
101793
|
+
}), /*#__PURE__*/(0,jsx_runtime_.jsxs)(ModalSection, {
|
|
101794
|
+
children: [/*#__PURE__*/(0,jsx_runtime_.jsx)(SectionTitle, {
|
|
101795
|
+
children: modal_copy === null || modal_copy === void 0 ? void 0 : modal_copy.sign_up_heading
|
|
101796
|
+
}), /*#__PURE__*/(0,jsx_runtime_.jsx)(SectionMessage, {
|
|
101797
|
+
children: modal_copy === null || modal_copy === void 0 ? void 0 : modal_copy.sign_up_message
|
|
101798
|
+
}), /*#__PURE__*/(0,jsx_runtime_.jsx)(OutlinedButton, {
|
|
101799
|
+
"data-testid": "signin-modal-create-account-cta",
|
|
101800
|
+
type: "button",
|
|
101801
|
+
onClick: function onClick() {
|
|
101802
|
+
return handleModalAuthNavigate(editing, closeModal, effectiveSignUp === null || effectiveSignUp === void 0 ? void 0 : effectiveSignUp.url);
|
|
101803
|
+
},
|
|
101804
|
+
"aria-label": modal_copy === null || modal_copy === void 0 ? void 0 : modal_copy.sign_up_cta_aria_label,
|
|
101805
|
+
children: modal_copy === null || modal_copy === void 0 ? void 0 : modal_copy.sign_up_cta_label
|
|
101806
|
+
})]
|
|
101807
|
+
})]
|
|
101808
|
+
})
|
|
101809
|
+
})]
|
|
101810
|
+
})
|
|
101811
|
+
}) : null]
|
|
101812
|
+
});
|
|
101813
|
+
}
|
|
101814
|
+
SignUpOrSignIn.propTypes = {
|
|
101815
|
+
show: (external_prop_types_default()).bool,
|
|
101816
|
+
icon: (external_prop_types_default()).string,
|
|
101817
|
+
icon_color: (external_prop_types_default()).string,
|
|
101818
|
+
sign_up: external_prop_types_default().shape({
|
|
101819
|
+
title: (external_prop_types_default()).string,
|
|
101820
|
+
url: (external_prop_types_default()).string
|
|
101821
|
+
}),
|
|
101822
|
+
sign_in: external_prop_types_default().shape({
|
|
101823
|
+
title: (external_prop_types_default()).string,
|
|
101824
|
+
url: (external_prop_types_default()).string
|
|
101825
|
+
}),
|
|
101826
|
+
modal_copy: external_prop_types_default().shape({
|
|
101827
|
+
close_dialog_aria_label: (external_prop_types_default()).string,
|
|
101828
|
+
sign_in_heading: (external_prop_types_default()).string,
|
|
101829
|
+
sign_in_message: (external_prop_types_default()).string,
|
|
101830
|
+
sign_in_cta_label: (external_prop_types_default()).string,
|
|
101831
|
+
sign_up_heading: (external_prop_types_default()).string,
|
|
101832
|
+
sign_up_message: (external_prop_types_default()).string,
|
|
101833
|
+
sign_up_cta_label: (external_prop_types_default()).string,
|
|
101834
|
+
sign_up_cta_aria_label: (external_prop_types_default()).string
|
|
101835
|
+
}),
|
|
101836
|
+
authService: external_prop_types_default().shape({
|
|
101837
|
+
getAuthLinks: (external_prop_types_default()).func
|
|
101838
|
+
}),
|
|
101839
|
+
parent$: external_prop_types_default().shape({
|
|
101840
|
+
icon: (external_prop_types_default()).object,
|
|
101841
|
+
icon_color: (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
|
|
101846
|
+
})
|
|
101847
|
+
};
|
|
101848
|
+
;// ./src/components/header/regions/HeaderAccountRegion.jsx
|
|
101849
|
+
|
|
101436
101850
|
|
|
101437
101851
|
|
|
101438
101852
|
|
|
101439
101853
|
function HeaderAccountRegion(_ref) {
|
|
101440
|
-
var data = _ref.data
|
|
101441
|
-
|
|
101442
|
-
|
|
101443
|
-
|
|
101444
|
-
|
|
101445
|
-
|
|
101446
|
-
|
|
101447
|
-
|
|
101448
|
-
|
|
101449
|
-
|
|
101450
|
-
|
|
101451
|
-
className: "account-divider",
|
|
101452
|
-
children: "/"
|
|
101453
|
-
}), /*#__PURE__*/(0,jsx_runtime_.jsx)(UtilityButton, {
|
|
101454
|
-
type: "button",
|
|
101455
|
-
className: "account-sign-in",
|
|
101456
|
-
children: data.sign_in_label
|
|
101457
|
-
})]
|
|
101854
|
+
var data = _ref.data,
|
|
101855
|
+
parent$ = _ref.parent$;
|
|
101856
|
+
var show = (data === null || data === void 0 ? void 0 : data.show) !== false;
|
|
101857
|
+
if (!show) return null;
|
|
101858
|
+
return /*#__PURE__*/(0,jsx_runtime_.jsx)(SignUpOrSignIn, {
|
|
101859
|
+
show: show,
|
|
101860
|
+
icon: data === null || data === void 0 ? void 0 : data.icon,
|
|
101861
|
+
icon_color: data === null || data === void 0 ? void 0 : data.icon_color,
|
|
101862
|
+
sign_up: data === null || data === void 0 ? void 0 : data.sign_up,
|
|
101863
|
+
sign_in: data === null || data === void 0 ? void 0 : data.sign_in,
|
|
101864
|
+
parent$: parent$
|
|
101458
101865
|
});
|
|
101459
101866
|
}
|
|
101460
101867
|
HeaderAccountRegion.propTypes = {
|
|
101461
101868
|
data: external_prop_types_default().shape({
|
|
101462
|
-
|
|
101463
|
-
|
|
101464
|
-
|
|
101869
|
+
show: (external_prop_types_default()).bool,
|
|
101870
|
+
icon: (external_prop_types_default()).string,
|
|
101871
|
+
icon_color: (external_prop_types_default()).string,
|
|
101872
|
+
sign_up: external_prop_types_default().shape({
|
|
101873
|
+
title: (external_prop_types_default()).string,
|
|
101874
|
+
url: (external_prop_types_default()).string
|
|
101875
|
+
}),
|
|
101876
|
+
sign_in: external_prop_types_default().shape({
|
|
101877
|
+
title: (external_prop_types_default()).string,
|
|
101878
|
+
url: (external_prop_types_default()).string
|
|
101879
|
+
})
|
|
101880
|
+
}),
|
|
101881
|
+
parent$: external_prop_types_default().shape({
|
|
101882
|
+
icon: (external_prop_types_default()).object,
|
|
101883
|
+
icon_color: (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
|
|
101888
|
+
})
|
|
101465
101889
|
};
|
|
101466
101890
|
;// ./src/components/cart/Cart.styled.jsx
|
|
101467
101891
|
|
|
@@ -101564,8 +101988,6 @@ HeaderCartRegion.defaultProps = {
|
|
|
101564
101988
|
};
|
|
101565
101989
|
// EXTERNAL MODULE: ./node_modules/@mui/icons-material/Close.js
|
|
101566
101990
|
var Close = __webpack_require__(9781);
|
|
101567
|
-
// EXTERNAL MODULE: ./node_modules/@mui/icons-material/Search.js
|
|
101568
|
-
var Search = __webpack_require__(4745);
|
|
101569
101991
|
;// ./src/components/input/Input.constants.js
|
|
101570
101992
|
var INPUT_ICON_POSITIONS = {
|
|
101571
101993
|
START: "start",
|
|
@@ -101732,7 +102154,7 @@ var Root = /*#__PURE__*/createStyled("div", true ? {
|
|
|
101732
102154
|
var $disabled = _ref9.$disabled;
|
|
101733
102155
|
return $disabled ? "\n opacity: 0.6;\n cursor: not-allowed;\n " : "\n cursor: text;\n ";
|
|
101734
102156
|
}, "@media (max-width: 340px){width:100%;}" + ( true ? "" : 0));
|
|
101735
|
-
var
|
|
102157
|
+
var Input_styled_IconWrap = /*#__PURE__*/createStyled("span", true ? {
|
|
101736
102158
|
target: "ec07usz3"
|
|
101737
102159
|
} : 0)("display:inline-flex;align-items:center;justify-content:center;width:", function (_ref0) {
|
|
101738
102160
|
var $size = _ref0.$size;
|
|
@@ -101793,12 +102215,12 @@ var InputPropTypes = {
|
|
|
101793
102215
|
className: (external_prop_types_default()).string
|
|
101794
102216
|
};
|
|
101795
102217
|
;// ./src/components/input/Input.jsx
|
|
101796
|
-
function
|
|
101797
|
-
function
|
|
102218
|
+
function Input_slicedToArray(r, e) { return Input_arrayWithHoles(r) || Input_iterableToArrayLimit(r, e) || Input_unsupportedIterableToArray(r, e) || Input_nonIterableRest(); }
|
|
102219
|
+
function Input_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."); }
|
|
101798
102220
|
function Input_unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return Input_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) ? Input_arrayLikeToArray(r, a) : void 0; } }
|
|
101799
102221
|
function Input_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; }
|
|
101800
|
-
function
|
|
101801
|
-
function
|
|
102222
|
+
function Input_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; } }
|
|
102223
|
+
function Input_arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
|
101802
102224
|
|
|
101803
102225
|
|
|
101804
102226
|
|
|
@@ -101827,7 +102249,7 @@ function Input(props) {
|
|
|
101827
102249
|
className = props.className;
|
|
101828
102250
|
var inputRef = (0,external_react_.useRef)(null);
|
|
101829
102251
|
var _useState = (0,external_react_.useState)(false),
|
|
101830
|
-
_useState2 =
|
|
102252
|
+
_useState2 = Input_slicedToArray(_useState, 2),
|
|
101831
102253
|
internalFocused = _useState2[0],
|
|
101832
102254
|
setInternalFocused = _useState2[1];
|
|
101833
102255
|
var canRender = typeof _onChange === "function";
|
|
@@ -101871,12 +102293,15 @@ function Input(props) {
|
|
|
101871
102293
|
var inputTestId = "".concat(rootTestId, "-input");
|
|
101872
102294
|
var iconTestId = "".concat(rootTestId, "-icon");
|
|
101873
102295
|
var clearTestId = "".concat(rootTestId, "-clear");
|
|
101874
|
-
var iconEl = /*#__PURE__*/(0,jsx_runtime_.jsx)(
|
|
102296
|
+
var iconEl = /*#__PURE__*/(0,jsx_runtime_.jsx)(Input_styled_IconWrap, {
|
|
101875
102297
|
"aria-hidden": "true",
|
|
101876
102298
|
"data-testid": iconTestId,
|
|
101877
102299
|
$size: normalizedSize,
|
|
101878
|
-
children: /*#__PURE__*/(0,jsx_runtime_.jsx)(
|
|
101879
|
-
|
|
102300
|
+
children: /*#__PURE__*/(0,jsx_runtime_.jsx)(dist.NsIcon, {
|
|
102301
|
+
name: "search",
|
|
102302
|
+
size: "medium",
|
|
102303
|
+
colorOverride: "currentColor",
|
|
102304
|
+
"aria-hidden": true
|
|
101880
102305
|
})
|
|
101881
102306
|
});
|
|
101882
102307
|
var inputEl = /*#__PURE__*/(0,jsx_runtime_.jsx)(TextInput, {
|
|
@@ -102592,10 +103017,12 @@ function AutoCompleteSearchField(_ref) {
|
|
|
102592
103017
|
"aria-label": "Search",
|
|
102593
103018
|
"data-testid": "autocomplete-search-button"
|
|
102594
103019
|
}, autoCompleteSearchIconTag !== null && autoCompleteSearchIconTag !== void 0 ? autoCompleteSearchIconTag : {}), {}, {
|
|
102595
|
-
children: /*#__PURE__*/(0,jsx_runtime_.jsx)(
|
|
102596
|
-
|
|
102597
|
-
"
|
|
102598
|
-
|
|
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
|
|
102599
103026
|
})
|
|
102600
103027
|
})), /*#__PURE__*/(0,jsx_runtime_.jsx)("input", AutoCompleteSearchField_objectSpread(AutoCompleteSearchField_objectSpread({
|
|
102601
103028
|
ref: inputRef,
|
|
@@ -103575,7 +104002,7 @@ var MobileSearchButton = /*#__PURE__*/createStyled("button", true ? {
|
|
|
103575
104002
|
} : 0);
|
|
103576
104003
|
var DesktopSearchWrapper = /*#__PURE__*/createStyled("button", true ? {
|
|
103577
104004
|
target: "etuykaq11"
|
|
103578
|
-
} : 0)("display:none;align-items:center;width:100%;border:1px solid ", SearchModal_styled_colors.border, ";border-radius:999px;background:", SearchModal_styled_colors.surface, ";min-height:46px;margin-left:auto;padding:0 5px 0 3px;box-sizing:border-box;overflow:hidden;&:focus{outline:none;}&:focus-visible{outline:2px solid currentColor;outline-offset:-2px;border-radius:
|
|
104005
|
+
} : 0)("display:none;align-items:center;width:100%;border:1px solid ", SearchModal_styled_colors.border, ";border-radius:999px;background:", SearchModal_styled_colors.surface, ";min-height:46px;margin-left:auto;padding:0 5px 0 3px;box-sizing:border-box;overflow:hidden;&:focus{outline:none;}&:focus-visible{outline:2px solid currentColor;outline-offset:-2px;border-radius:999px;}@media (min-width: 1024px){display:flex;width:", function (_ref) {
|
|
103579
104006
|
var $sizeVariant = _ref.$sizeVariant;
|
|
103580
104007
|
return $sizeVariant === "full" ? "100%" : "min(100%, 320px)";
|
|
103581
104008
|
}, ";cursor:pointer;transition:background-color 0.15s ease,border-color 0.15s ease,box-shadow 0.15s ease;min-height:32px;&:hover{background:#f3f4f6;}&:hover>[data-testid=\"search-trigger-input\"]{text-decoration:underline;text-decoration-thickness:1px;text-underline-offset:2px;}&:focus-visible{border-color:", SearchModal_styled_colors.muted, ";box-shadow:0 0 0 1px rgba(17, 24, 39, 0.08);}}" + ( true ? "" : 0));
|
|
@@ -103596,7 +104023,7 @@ var ModalOverlay = /*#__PURE__*/createStyled("div", true ? {
|
|
|
103596
104023
|
} : 0);
|
|
103597
104024
|
var ModalPanel = /*#__PURE__*/createStyled("dialog", true ? {
|
|
103598
104025
|
target: "etuykaq7"
|
|
103599
|
-
} : 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:
|
|
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));
|
|
103600
104027
|
var ModalTopBar = /*#__PURE__*/createStyled("div", true ? {
|
|
103601
104028
|
target: "etuykaq6"
|
|
103602
104029
|
} : 0)( true ? {
|
|
@@ -103671,7 +104098,6 @@ function SearchModal_toPrimitive(t, r) { if ("object" != SearchModal_typeof(t) |
|
|
|
103671
104098
|
|
|
103672
104099
|
|
|
103673
104100
|
|
|
103674
|
-
|
|
103675
104101
|
function getFocusableElementsInPanel(panel) {
|
|
103676
104102
|
if (!panel) return [];
|
|
103677
104103
|
return Array.from(panel.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])')).filter(function (el) {
|
|
@@ -103729,10 +104155,12 @@ function renderMobileTrigger(_ref2) {
|
|
|
103729
104155
|
"aria-expanded": isOpen,
|
|
103730
104156
|
onClick: openModal,
|
|
103731
104157
|
"data-testid": "search-modal-trigger-mobile",
|
|
103732
|
-
children: /*#__PURE__*/(0,jsx_runtime_.jsx)(
|
|
103733
|
-
|
|
103734
|
-
"
|
|
103735
|
-
|
|
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
|
|
103736
104164
|
})
|
|
103737
104165
|
});
|
|
103738
104166
|
}
|
|
@@ -103761,10 +104189,12 @@ function renderDesktopTrigger(_ref3) {
|
|
|
103761
104189
|
children: [/*#__PURE__*/(0,jsx_runtime_.jsx)(DesktopTriggerIconButton, SearchModal_objectSpread(SearchModal_objectSpread({
|
|
103762
104190
|
"data-testid": "search-trigger-button"
|
|
103763
104191
|
}, (_activeEditableTags$t = activeEditableTags === null || activeEditableTags === void 0 ? void 0 : activeEditableTags.triggerIcon) !== null && _activeEditableTags$t !== void 0 ? _activeEditableTags$t : {}), {}, {
|
|
103764
|
-
children: /*#__PURE__*/(0,jsx_runtime_.jsx)(
|
|
103765
|
-
|
|
103766
|
-
"
|
|
103767
|
-
|
|
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
|
|
103768
104198
|
})
|
|
103769
104199
|
})), /*#__PURE__*/(0,jsx_runtime_.jsx)(DesktopTriggerInput, SearchModal_objectSpread(SearchModal_objectSpread({
|
|
103770
104200
|
"data-testid": "search-trigger-input"
|
|
@@ -103783,13 +104213,6 @@ function SearchModal(_ref4) {
|
|
|
103783
104213
|
onSearch = _ref4$onSearch === void 0 ? function () {} : _ref4$onSearch,
|
|
103784
104214
|
_ref4$modalTitle = _ref4.modalTitle,
|
|
103785
104215
|
modalTitle = _ref4$modalTitle === void 0 ? MODAL_TITLE : _ref4$modalTitle,
|
|
103786
|
-
brandLogo = _ref4.brandLogo,
|
|
103787
|
-
brandLogoAlt = _ref4.brandLogoAlt,
|
|
103788
|
-
brandHref = _ref4.brandHref,
|
|
103789
|
-
_ref4$brandSize = _ref4.brandSize,
|
|
103790
|
-
brandSize = _ref4$brandSize === void 0 ? "Medium" : _ref4$brandSize,
|
|
103791
|
-
_ref4$showBrandLogo = _ref4.showBrandLogo,
|
|
103792
|
-
showBrandLogo = _ref4$showBrandLogo === void 0 ? true : _ref4$showBrandLogo,
|
|
103793
104216
|
_ref4$cancelLabel = _ref4.cancelLabel,
|
|
103794
104217
|
cancelLabel = _ref4$cancelLabel === void 0 ? "Cancel" : _ref4$cancelLabel,
|
|
103795
104218
|
_ref4$cancelShowIcon = _ref4.cancelShowIcon,
|
|
@@ -103808,6 +104231,8 @@ function SearchModal(_ref4) {
|
|
|
103808
104231
|
clearAllLabel = _ref4$clearAllLabel === void 0 ? "Clear all" : _ref4$clearAllLabel,
|
|
103809
104232
|
_ref4$parent$ = _ref4.parent$,
|
|
103810
104233
|
parent$ = _ref4$parent$ === void 0 ? undefined : _ref4$parent$,
|
|
104234
|
+
_ref4$logo = _ref4.logo,
|
|
104235
|
+
logo = _ref4$logo === void 0 ? undefined : _ref4$logo,
|
|
103811
104236
|
_ref4$inputSize = _ref4.inputSize,
|
|
103812
104237
|
inputSize = _ref4$inputSize === void 0 ? DEFAULT_INPUT_SIZE : _ref4$inputSize,
|
|
103813
104238
|
_ref4$inputSizeVarian = _ref4.inputSizeVariant,
|
|
@@ -103816,7 +104241,6 @@ function SearchModal(_ref4) {
|
|
|
103816
104241
|
showMobileTrigger = _ref4$showMobileTrigg === void 0 ? true : _ref4$showMobileTrigg,
|
|
103817
104242
|
_ref4$showDesktopTrig = _ref4.showDesktopTrigger,
|
|
103818
104243
|
showDesktopTrigger = _ref4$showDesktopTrig === void 0 ? true : _ref4$showDesktopTrig;
|
|
103819
|
-
var editing = isEditingMode();
|
|
103820
104244
|
var activeEditableTags = parent$;
|
|
103821
104245
|
var _useState = (0,external_react_.useState)(false),
|
|
103822
104246
|
_useState2 = SearchModal_slicedToArray(_useState, 2),
|
|
@@ -103982,18 +104406,13 @@ function SearchModal(_ref4) {
|
|
|
103982
104406
|
children: [/*#__PURE__*/(0,jsx_runtime_.jsx)(SearchModal_styled_LogoSlot, {
|
|
103983
104407
|
"data-testid": "search-modal-logo-slot",
|
|
103984
104408
|
children: /*#__PURE__*/(0,jsx_runtime_.jsx)(Brand, {
|
|
103985
|
-
|
|
103986
|
-
|
|
103987
|
-
|
|
103988
|
-
|
|
103989
|
-
showLogo:
|
|
103990
|
-
|
|
103991
|
-
|
|
103992
|
-
logo_url: activeEditableTags === null || activeEditableTags === void 0 ? void 0 : activeEditableTags.logoUrl,
|
|
103993
|
-
show_logo: activeEditableTags === null || activeEditableTags === void 0 ? void 0 : activeEditableTags.showBrandLogo,
|
|
103994
|
-
logo_size: activeEditableTags === null || activeEditableTags === void 0 ? void 0 : activeEditableTags.brandSize
|
|
103995
|
-
},
|
|
103996
|
-
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.$
|
|
103997
104416
|
})
|
|
103998
104417
|
}), /*#__PURE__*/(0,jsx_runtime_.jsx)("span", SearchModal_objectSpread(SearchModal_objectSpread({
|
|
103999
104418
|
onPointerDown: function onPointerDown() {
|
|
@@ -104020,11 +104439,6 @@ SearchModal.propTypes = {
|
|
|
104020
104439
|
searchPlaceholder: (external_prop_types_default()).string,
|
|
104021
104440
|
onSearch: (external_prop_types_default()).func,
|
|
104022
104441
|
modalTitle: (external_prop_types_default()).string,
|
|
104023
|
-
brandLogo: (external_prop_types_default()).string,
|
|
104024
|
-
brandLogoAlt: (external_prop_types_default()).string,
|
|
104025
|
-
brandHref: (external_prop_types_default()).string,
|
|
104026
|
-
brandSize: external_prop_types_default().oneOf(["Small", "Medium", "Large"]),
|
|
104027
|
-
showBrandLogo: (external_prop_types_default()).bool,
|
|
104028
104442
|
cancelLabel: (external_prop_types_default()).string,
|
|
104029
104443
|
cancelShowIcon: (external_prop_types_default()).bool,
|
|
104030
104444
|
headerSearchService: autoCompleteHeaderSearchServiceShape,
|
|
@@ -104034,6 +104448,14 @@ SearchModal.propTypes = {
|
|
|
104034
104448
|
recentSearchesHeading: (external_prop_types_default()).string,
|
|
104035
104449
|
clearAllLabel: (external_prop_types_default()).string,
|
|
104036
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
|
+
}),
|
|
104037
104459
|
inputSize: external_prop_types_default().oneOf([INPUT_SIZES.SM, INPUT_SIZES.MD, INPUT_SIZES.LG]),
|
|
104038
104460
|
inputSizeVariant: external_prop_types_default().oneOf([INPUT_SIZE_VARIANTS.DEFAULT, INPUT_SIZE_VARIANTS.WIDE, INPUT_SIZE_VARIANTS.FULL]),
|
|
104039
104461
|
showMobileTrigger: (external_prop_types_default()).bool,
|
|
@@ -104595,6 +105017,7 @@ function HeaderSearchRegion(_ref) {
|
|
|
104595
105017
|
language = _ref.language,
|
|
104596
105018
|
locale = _ref.locale,
|
|
104597
105019
|
searchConfig = _ref.searchConfig,
|
|
105020
|
+
logo = _ref.logo,
|
|
104598
105021
|
showMobileTrigger = _ref.showMobileTrigger,
|
|
104599
105022
|
showDesktopTrigger = _ref.showDesktopTrigger;
|
|
104600
105023
|
var headerSearchService = (0,external_react_.useMemo)(function () {
|
|
@@ -104657,11 +105080,7 @@ function HeaderSearchRegion(_ref) {
|
|
|
104657
105080
|
return headerSearchService.submitProductSearch(query);
|
|
104658
105081
|
},
|
|
104659
105082
|
modalTitle: searchConfig === null || searchConfig === void 0 ? void 0 : searchConfig.modalTitle,
|
|
104660
|
-
|
|
104661
|
-
brandLogoAlt: searchConfig === null || searchConfig === void 0 ? void 0 : searchConfig.brandLogoAlt,
|
|
104662
|
-
brandHref: searchConfig === null || searchConfig === void 0 ? void 0 : searchConfig.brandHref,
|
|
104663
|
-
brandSize: searchConfig === null || searchConfig === void 0 ? void 0 : searchConfig.brandSize,
|
|
104664
|
-
showBrandLogo: searchConfig === null || searchConfig === void 0 ? void 0 : searchConfig.showBrandLogo,
|
|
105083
|
+
logo: logo,
|
|
104665
105084
|
cancelLabel: searchConfig === null || searchConfig === void 0 ? void 0 : searchConfig.cancelLabel,
|
|
104666
105085
|
cancelShowIcon: searchConfig === null || searchConfig === void 0 ? void 0 : searchConfig.cancelShowIcon,
|
|
104667
105086
|
showRecentSearches: (_searchConfig$recentS = searchConfig === null || searchConfig === void 0 ? void 0 : searchConfig.recentSearchesEnabled) !== null && _searchConfig$recentS !== void 0 ? _searchConfig$recentS : true,
|
|
@@ -104681,6 +105100,14 @@ HeaderSearchRegion.propTypes = {
|
|
|
104681
105100
|
language: (external_prop_types_default()).string.isRequired,
|
|
104682
105101
|
locale: (external_prop_types_default()).string.isRequired,
|
|
104683
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
|
+
}),
|
|
104684
105111
|
showMobileTrigger: (external_prop_types_default()).bool,
|
|
104685
105112
|
showDesktopTrigger: (external_prop_types_default()).bool
|
|
104686
105113
|
};
|
|
@@ -104970,6 +105397,7 @@ var TopRibbon = function TopRibbon(_ref) {
|
|
|
104970
105397
|
TopRibbon.propTypes = TopRibbonPropTypes;
|
|
104971
105398
|
/* harmony default export */ const top_ribbon_TopRibbon = (TopRibbon);
|
|
104972
105399
|
;// ./src/components/brand/brand.helpers.js
|
|
105400
|
+
function brand_helpers_typeof(o) { "@babel/helpers - typeof"; return brand_helpers_typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, brand_helpers_typeof(o); }
|
|
104973
105401
|
function parseLogoData(logoData) {
|
|
104974
105402
|
if (!logoData) {
|
|
104975
105403
|
return {
|
|
@@ -104991,8 +105419,14 @@ function parseLogoData(logoData) {
|
|
|
104991
105419
|
var logoUrl;
|
|
104992
105420
|
if (header_logo) {
|
|
104993
105421
|
try {
|
|
104994
|
-
var
|
|
104995
|
-
var
|
|
105422
|
+
var _parsed;
|
|
105423
|
+
var parsed;
|
|
105424
|
+
if (typeof header_logo === "string") {
|
|
105425
|
+
parsed = JSON.parse(header_logo);
|
|
105426
|
+
} else if (brand_helpers_typeof(header_logo) === "object") {
|
|
105427
|
+
parsed = header_logo;
|
|
105428
|
+
}
|
|
105429
|
+
var imageArray = (_parsed = parsed) === null || _parsed === void 0 ? void 0 : _parsed.image;
|
|
104996
105430
|
if (Array.isArray(imageArray) && imageArray.length > 0) {
|
|
104997
105431
|
var _firstImage$selected, _firstImage$files, _firstImage$files2;
|
|
104998
105432
|
var firstImage = imageArray[0];
|
|
@@ -106762,7 +107196,7 @@ var HeaderRow = /*#__PURE__*/createStyled("header", true ? {
|
|
|
106762
107196
|
var LogoWrap = /*#__PURE__*/createStyled("div", true ? {
|
|
106763
107197
|
target: "e1g1uu3p6"
|
|
106764
107198
|
} : 0)("display:inline-flex;align-items:center;justify-content:flex-start;justify-self:start;width:147.5px;height:30px;>*{width:147.5px;height:30px;display:inline-flex;}@media (max-width: ", TABS_MOBILE_MAX_WIDTH_PX, "px){display:none;}" + ( true ? "" : 0));
|
|
106765
|
-
var
|
|
107199
|
+
var MarketSelector_styled_ModalTitle = /*#__PURE__*/createStyled("h2", true ? {
|
|
106766
107200
|
target: "e1g1uu3p5"
|
|
106767
107201
|
} : 0)("margin:0;justify-self:center;grid-column:2;min-width:0;width:fit-content;max-width:100%;height:auto;min-height:34px;text-align:center;color:#252525;font-family:Lora,sans-serif;font-size:26px;line-height:34px;font-weight:400;white-space:normal;overflow-wrap:break-word;@media (max-width: ", TABS_MOBILE_MAX_WIDTH_PX, "px){text-align:left;font-size:44px;line-height:58px;}" + ( true ? "" : 0));
|
|
106768
107202
|
var CancelWrap = /*#__PURE__*/createStyled("div", true ? {
|
|
@@ -107372,7 +107806,7 @@ function renderMarketSelectorModalDesktop(_ref7) {
|
|
|
107372
107806
|
size: logo === null || logo === void 0 ? void 0 : logo.size,
|
|
107373
107807
|
$: logo === null || logo === void 0 ? void 0 : logo.$
|
|
107374
107808
|
})
|
|
107375
|
-
}), /*#__PURE__*/(0,jsx_runtime_.jsx)(
|
|
107809
|
+
}), /*#__PURE__*/(0,jsx_runtime_.jsx)(MarketSelector_styled_ModalTitle, MarketSelector_objectSpread(MarketSelector_objectSpread({
|
|
107376
107810
|
id: "market-selector-modal-title"
|
|
107377
107811
|
}, (_marketSelectorDollar = marketSelectorDollar === null || marketSelectorDollar === void 0 ? void 0 : marketSelectorDollar.select_your_market_language_text) !== null && _marketSelectorDollar !== void 0 ? _marketSelectorDollar : {}), {}, {
|
|
107378
107812
|
children: text.modalTitle
|
|
@@ -108041,8 +108475,17 @@ var DEFAULT_LOYALTY = {
|
|
|
108041
108475
|
href: "/rewards"
|
|
108042
108476
|
};
|
|
108043
108477
|
var DEFAULT_ACCOUNT = {
|
|
108044
|
-
|
|
108045
|
-
|
|
108478
|
+
show: true,
|
|
108479
|
+
icon: "userOutline",
|
|
108480
|
+
icon_color: undefined,
|
|
108481
|
+
sign_up: {
|
|
108482
|
+
title: "Sign Up",
|
|
108483
|
+
url: ""
|
|
108484
|
+
},
|
|
108485
|
+
sign_in: {
|
|
108486
|
+
title: "Sign In",
|
|
108487
|
+
url: ""
|
|
108488
|
+
}
|
|
108046
108489
|
};
|
|
108047
108490
|
var DEFAULT_CART = {
|
|
108048
108491
|
show_cart_icon: false,
|
|
@@ -108100,24 +108543,111 @@ var DEFAULT_TOP_RIBBON_LINKS = [{
|
|
|
108100
108543
|
url: "/gifts",
|
|
108101
108544
|
ariaLabel: "Shop Gifts"
|
|
108102
108545
|
}];
|
|
108103
|
-
function
|
|
108104
|
-
var
|
|
108105
|
-
|
|
108106
|
-
|
|
108107
|
-
|
|
108108
|
-
|
|
108109
|
-
|
|
108546
|
+
function firstDefined() {
|
|
108547
|
+
for (var _len = arguments.length, values = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
108548
|
+
values[_key] = arguments[_key];
|
|
108549
|
+
}
|
|
108550
|
+
for (var _i = 0, _values = values; _i < _values.length; _i++) {
|
|
108551
|
+
var value = _values[_i];
|
|
108552
|
+
if (value !== undefined && value !== null) return value;
|
|
108553
|
+
}
|
|
108554
|
+
return undefined;
|
|
108555
|
+
}
|
|
108556
|
+
function normalizeShowFlag(value) {
|
|
108557
|
+
var fallback = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
|
|
108558
|
+
if (value === undefined || value === null) return fallback;
|
|
108559
|
+
if (typeof value === "boolean") return value;
|
|
108560
|
+
var normalized = String(value).trim().toLowerCase();
|
|
108561
|
+
if (normalized === "false" || normalized === "0" || normalized === "no") {
|
|
108562
|
+
return false;
|
|
108563
|
+
}
|
|
108564
|
+
if (normalized === "true" || normalized === "1" || normalized === "yes") {
|
|
108565
|
+
return true;
|
|
108566
|
+
}
|
|
108567
|
+
return Boolean(value);
|
|
108568
|
+
}
|
|
108569
|
+
function normalizeUtilityLinksEntries(utilityLinksRaw) {
|
|
108570
|
+
if (Array.isArray(utilityLinksRaw)) return utilityLinksRaw;
|
|
108571
|
+
if (utilityLinksRaw) return [utilityLinksRaw];
|
|
108572
|
+
return [];
|
|
108573
|
+
}
|
|
108574
|
+
function pickUtilityLinksEntry(utilityLinksEntries) {
|
|
108575
|
+
return utilityLinksEntries.find(function (entry) {
|
|
108576
|
+
return entry === null || entry === void 0 ? void 0 : entry.sign_up_sign_in_component;
|
|
108577
|
+
}) || utilityLinksEntries[0] || null;
|
|
108578
|
+
}
|
|
108579
|
+
function pickAuthTextField(authData, fieldKey) {
|
|
108580
|
+
var value = authData === null || authData === void 0 ? void 0 : authData[fieldKey];
|
|
108581
|
+
if (typeof value !== "string") return undefined;
|
|
108582
|
+
var trimmed = value.trim();
|
|
108583
|
+
return trimmed || undefined;
|
|
108584
|
+
}
|
|
108585
|
+
function buildAccountData(_ref) {
|
|
108586
|
+
var _firstDefined, _firstDefined2, _firstDefined3, _firstDefined4, _firstDefined5, _firstDefined6;
|
|
108587
|
+
var utilityAuthData = _ref.utilityAuthData,
|
|
108588
|
+
legacyAccountData = _ref.legacyAccountData;
|
|
108589
|
+
return {
|
|
108590
|
+
show: normalizeShowFlag(firstDefined(utilityAuthData === null || utilityAuthData === void 0 ? void 0 : utilityAuthData.show, legacyAccountData === null || legacyAccountData === void 0 ? void 0 : legacyAccountData.show), DEFAULT_ACCOUNT.show),
|
|
108591
|
+
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,
|
|
108592
|
+
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,
|
|
108593
|
+
sign_up: {
|
|
108594
|
+
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,
|
|
108595
|
+
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
|
|
108596
|
+
},
|
|
108597
|
+
sign_in: {
|
|
108598
|
+
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,
|
|
108599
|
+
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
|
|
108600
|
+
}
|
|
108601
|
+
};
|
|
108602
|
+
}
|
|
108603
|
+
function buildAccountParentTags(_ref2) {
|
|
108604
|
+
var _utilityLinksEntry$$, _utilityLinksEntry$$2, _legacyAccountData$$, _legacyAccountData$$2, _legacyAccountData$$3;
|
|
108605
|
+
var utilityAuthData = _ref2.utilityAuthData,
|
|
108606
|
+
utilityLinksEntry = _ref2.utilityLinksEntry,
|
|
108607
|
+
legacyAccountData = _ref2.legacyAccountData;
|
|
108608
|
+
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);
|
|
108609
|
+
var pickTag = function pickTag(key) {
|
|
108610
|
+
var _utilityAuthData$$;
|
|
108611
|
+
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]);
|
|
108612
|
+
};
|
|
108613
|
+
return {
|
|
108614
|
+
icon: pickTag("icon") || (legacyAccountData === null || legacyAccountData === void 0 || (_legacyAccountData$$ = legacyAccountData.$) === null || _legacyAccountData$$ === void 0 ? void 0 : _legacyAccountData$$.icon),
|
|
108615
|
+
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),
|
|
108616
|
+
sign_up: pickTag("sign_up"),
|
|
108617
|
+
sign_up_url: pickTag("sign_up_url"),
|
|
108618
|
+
sign_in: pickTag("sign_in"),
|
|
108619
|
+
sign_in_url: pickTag("sign_in_url")
|
|
108620
|
+
};
|
|
108621
|
+
}
|
|
108622
|
+
function HeaderView(_ref3) {
|
|
108623
|
+
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;
|
|
108624
|
+
var country = _ref3.country,
|
|
108625
|
+
language = _ref3.language,
|
|
108626
|
+
locale = _ref3.locale,
|
|
108627
|
+
headerEntry = _ref3.headerEntry,
|
|
108628
|
+
searchConfig = _ref3.searchConfig;
|
|
108110
108629
|
var _useState = (0,external_react_.useState)(false),
|
|
108111
108630
|
_useState2 = HeaderView_slicedToArray(_useState, 2),
|
|
108112
108631
|
isMobileMenuOpen = _useState2[0],
|
|
108113
108632
|
setIsMobileMenuOpen = _useState2[1];
|
|
108114
108633
|
var mobileMarketTriggerMountRef = (0,external_react_.useRef)(null);
|
|
108634
|
+
var utilityLinksRaw = headerEntry === null || headerEntry === void 0 ? void 0 : headerEntry.utility_links;
|
|
108635
|
+
var utilityLinksEntries = normalizeUtilityLinksEntries(utilityLinksRaw);
|
|
108636
|
+
var utilityLinksEntry = pickUtilityLinksEntry(utilityLinksEntries);
|
|
108115
108637
|
var logoData = parseLogoData((_headerEntry$logo = headerEntry === null || headerEntry === void 0 ? void 0 : headerEntry.logo) !== null && _headerEntry$logo !== void 0 ? _headerEntry$logo : DEFAULT_LOGO);
|
|
108116
108638
|
var localeData = (_headerEntry$locale_s = headerEntry === null || headerEntry === void 0 ? void 0 : headerEntry.locale_selector) !== null && _headerEntry$locale_s !== void 0 ? _headerEntry$locale_s : DEFAULT_LOCALE;
|
|
108117
|
-
var loyaltyData = (
|
|
108118
|
-
|
|
108119
|
-
|
|
108120
|
-
var accountData = (
|
|
108639
|
+
var loyaltyData = (_utilityLinksEntry$lo = utilityLinksEntry === null || utilityLinksEntry === void 0 || (_utilityLinksEntry$lo2 = utilityLinksEntry.loyalty_menu) === null || _utilityLinksEntry$lo2 === void 0 ? void 0 : _utilityLinksEntry$lo2[0]) !== null && _utilityLinksEntry$lo !== void 0 ? _utilityLinksEntry$lo : DEFAULT_LOYALTY;
|
|
108640
|
+
var utilityAuthData = utilityLinksEntry === null || utilityLinksEntry === void 0 ? void 0 : utilityLinksEntry.sign_up_sign_in_component;
|
|
108641
|
+
var legacyAccountData = headerEntry === null || headerEntry === void 0 ? void 0 : headerEntry.account;
|
|
108642
|
+
var accountData = buildAccountData({
|
|
108643
|
+
utilityAuthData: utilityAuthData,
|
|
108644
|
+
legacyAccountData: legacyAccountData
|
|
108645
|
+
});
|
|
108646
|
+
var accountParentTags = buildAccountParentTags({
|
|
108647
|
+
utilityAuthData: utilityAuthData,
|
|
108648
|
+
utilityLinksEntry: utilityLinksEntry,
|
|
108649
|
+
legacyAccountData: legacyAccountData
|
|
108650
|
+
});
|
|
108121
108651
|
var cartData = (_headerEntry$cart = headerEntry === null || headerEntry === void 0 ? void 0 : headerEntry.cart) !== null && _headerEntry$cart !== void 0 ? _headerEntry$cart : DEFAULT_CART;
|
|
108122
108652
|
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;
|
|
108123
108653
|
var navigationData = (_headerEntry$navigati = headerEntry === null || headerEntry === void 0 ? void 0 : headerEntry.navigation) !== null && _headerEntry$navigati !== void 0 ? _headerEntry$navigati : DEFAULT_NAVIGATION;
|
|
@@ -108139,17 +108669,24 @@ function HeaderView(_ref) {
|
|
|
108139
108669
|
"aria-label": "Open menu",
|
|
108140
108670
|
children: /*#__PURE__*/(0,jsx_runtime_.jsx)(IconMenu, {})
|
|
108141
108671
|
}), /*#__PURE__*/(0,jsx_runtime_.jsx)(LogoSlot, {
|
|
108142
|
-
children: /*#__PURE__*/(0,jsx_runtime_.jsx)(
|
|
108143
|
-
|
|
108672
|
+
children: /*#__PURE__*/(0,jsx_runtime_.jsx)(Brand, {
|
|
108673
|
+
logo: logoData.logo,
|
|
108674
|
+
logoAlt: logoData.logoAlt,
|
|
108675
|
+
href: logoData.href,
|
|
108676
|
+
showLogo: logoData.showLogo,
|
|
108677
|
+
size: logoData.size,
|
|
108678
|
+
$: logoData.$
|
|
108144
108679
|
})
|
|
108145
108680
|
}), /*#__PURE__*/(0,jsx_runtime_.jsxs)(MobileUtilityBar, {
|
|
108146
108681
|
children: [/*#__PURE__*/(0,jsx_runtime_.jsx)(HeaderAccountRegion, {
|
|
108147
|
-
data: accountData
|
|
108682
|
+
data: accountData,
|
|
108683
|
+
parent$: accountParentTags
|
|
108148
108684
|
}), /*#__PURE__*/(0,jsx_runtime_.jsx)(HeaderSearchRegion, {
|
|
108149
108685
|
country: country,
|
|
108150
108686
|
language: language,
|
|
108151
108687
|
locale: locale,
|
|
108152
108688
|
searchConfig: searchConfig,
|
|
108689
|
+
logo: logoData,
|
|
108153
108690
|
showDesktopTrigger: false
|
|
108154
108691
|
}), /*#__PURE__*/(0,jsx_runtime_.jsx)(HeaderCartRegion, {
|
|
108155
108692
|
data: cartData,
|
|
@@ -108161,7 +108698,7 @@ function HeaderView(_ref) {
|
|
|
108161
108698
|
children: [/*#__PURE__*/(0,jsx_runtime_.jsx)(MarketSelector, {
|
|
108162
108699
|
data: marketSelector,
|
|
108163
108700
|
logo: logoData,
|
|
108164
|
-
locale: String((
|
|
108701
|
+
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(),
|
|
108165
108702
|
parent$: headerEntry === null || headerEntry === void 0 || (_headerEntry$$2 = headerEntry.$) === null || _headerEntry$$2 === void 0 ? void 0 : _headerEntry$$2.market_selector__0,
|
|
108166
108703
|
mobileTriggerMode: "drawerPortal",
|
|
108167
108704
|
drawerOpen: isMobileMenuOpen,
|
|
@@ -108169,7 +108706,8 @@ function HeaderView(_ref) {
|
|
|
108169
108706
|
}), /*#__PURE__*/(0,jsx_runtime_.jsx)(HeaderLoyaltyRegion, {
|
|
108170
108707
|
data: loyaltyData
|
|
108171
108708
|
}), /*#__PURE__*/(0,jsx_runtime_.jsx)(HeaderAccountRegion, {
|
|
108172
|
-
data: accountData
|
|
108709
|
+
data: accountData,
|
|
108710
|
+
parent$: accountParentTags
|
|
108173
108711
|
}), /*#__PURE__*/(0,jsx_runtime_.jsx)(HeaderCartRegion, {
|
|
108174
108712
|
data: cartData,
|
|
108175
108713
|
parent$: headerEntry === null || headerEntry === void 0 || (_headerEntry$$3 = headerEntry.$) === null || _headerEntry$$3 === void 0 ? void 0 : _headerEntry$$3.cart
|
|
@@ -108180,6 +108718,7 @@ function HeaderView(_ref) {
|
|
|
108180
108718
|
language: language,
|
|
108181
108719
|
locale: locale,
|
|
108182
108720
|
searchConfig: searchConfig,
|
|
108721
|
+
logo: logoData,
|
|
108183
108722
|
showMobileTrigger: false
|
|
108184
108723
|
})
|
|
108185
108724
|
})]
|