@nuskin/nextgen-header 1.36.0 → 1.38.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.
- package/package-dist/index.js +1872 -390
- package/package-dist/index.js.map +1 -1
- package/package-dist/index.mjs +112739 -0
- package/package-dist/index.mjs.map +1 -0
- package/package.json +1 -1
package/package-dist/index.js
CHANGED
|
@@ -101049,6 +101049,13 @@ var GTM_TRACKING_CONFIG = {
|
|
|
101049
101049
|
// Loyalty is always an anchor (`data-gtm-loyalty`); selector works for GTM delegation.
|
|
101050
101050
|
clickSelector: "[data-gtm-loyalty]"
|
|
101051
101051
|
},
|
|
101052
|
+
topRibbon: {
|
|
101053
|
+
componentName: "Top Ribbon",
|
|
101054
|
+
clickEvent: "top_ribbon_click",
|
|
101055
|
+
clickElement: "CTA Click",
|
|
101056
|
+
clickSelector: "a",
|
|
101057
|
+
extractClickData: true
|
|
101058
|
+
},
|
|
101052
101059
|
logo: {
|
|
101053
101060
|
componentName: "Logo",
|
|
101054
101061
|
clickEvent: "logo_click",
|
|
@@ -103161,7 +103168,85 @@ HeaderLoyaltyRegion.propTypes = {
|
|
|
103161
103168
|
$: (external_prop_types_default()).object
|
|
103162
103169
|
})
|
|
103163
103170
|
};
|
|
103164
|
-
;// ./src/components/signup-signin/
|
|
103171
|
+
;// ./src/components/signup-signin/SignUpSignIn.propTypes.js
|
|
103172
|
+
|
|
103173
|
+
var authLinkPropType = external_prop_types_default().shape({
|
|
103174
|
+
title: (external_prop_types_default()).string,
|
|
103175
|
+
url: (external_prop_types_default()).string
|
|
103176
|
+
});
|
|
103177
|
+
var modalCopyPropType = external_prop_types_default().shape({
|
|
103178
|
+
close_dialog_aria_label: (external_prop_types_default()).string,
|
|
103179
|
+
sign_in_heading: (external_prop_types_default()).string,
|
|
103180
|
+
sign_in_message: (external_prop_types_default()).string,
|
|
103181
|
+
sign_in_cta_label: (external_prop_types_default()).string,
|
|
103182
|
+
sign_up_heading: (external_prop_types_default()).string,
|
|
103183
|
+
sign_up_message: (external_prop_types_default()).string,
|
|
103184
|
+
sign_up_cta_label: (external_prop_types_default()).string,
|
|
103185
|
+
sign_up_cta_aria_label: (external_prop_types_default()).string,
|
|
103186
|
+
profile_heading: (external_prop_types_default()).string,
|
|
103187
|
+
profile_view_all_label: (external_prop_types_default()).string,
|
|
103188
|
+
quick_links_heading: (external_prop_types_default()).string,
|
|
103189
|
+
wallet_heading: (external_prop_types_default()).string,
|
|
103190
|
+
credit_label: (external_prop_types_default()).string,
|
|
103191
|
+
promos_label: (external_prop_types_default()).string,
|
|
103192
|
+
sign_out_label: (external_prop_types_default()).string,
|
|
103193
|
+
view_account_label: (external_prop_types_default()).string,
|
|
103194
|
+
copy_id_label: (external_prop_types_default()).string,
|
|
103195
|
+
copied_id_label: (external_prop_types_default()).string
|
|
103196
|
+
});
|
|
103197
|
+
var authServicePropType = external_prop_types_default().shape({
|
|
103198
|
+
getAuthLinks: (external_prop_types_default()).func,
|
|
103199
|
+
navigateToAccount: (external_prop_types_default()).func,
|
|
103200
|
+
navigateToSignIn: (external_prop_types_default()).func,
|
|
103201
|
+
navigateToSignUp: (external_prop_types_default()).func,
|
|
103202
|
+
signIn: (external_prop_types_default()).func,
|
|
103203
|
+
signUp: (external_prop_types_default()).func,
|
|
103204
|
+
account: (external_prop_types_default()).func,
|
|
103205
|
+
signOut: (external_prop_types_default()).func
|
|
103206
|
+
});
|
|
103207
|
+
var parentTagsPropType = external_prop_types_default().shape({
|
|
103208
|
+
icon: (external_prop_types_default()).object,
|
|
103209
|
+
icon_color: (external_prop_types_default()).object,
|
|
103210
|
+
sign_up: (external_prop_types_default()).object,
|
|
103211
|
+
sign_up_url: (external_prop_types_default()).object,
|
|
103212
|
+
sign_in: (external_prop_types_default()).object,
|
|
103213
|
+
signed_in: (external_prop_types_default()).object
|
|
103214
|
+
});
|
|
103215
|
+
var profileUtilityLinksPropType = external_prop_types_default().shape({
|
|
103216
|
+
wallet_url: (external_prop_types_default()).string,
|
|
103217
|
+
quick_links: external_prop_types_default().arrayOf(external_prop_types_default().shape({
|
|
103218
|
+
title: (external_prop_types_default()).string,
|
|
103219
|
+
affiliate_only: (external_prop_types_default()).bool,
|
|
103220
|
+
links: external_prop_types_default().arrayOf(external_prop_types_default().shape({
|
|
103221
|
+
label: (external_prop_types_default()).string,
|
|
103222
|
+
url: (external_prop_types_default()).string,
|
|
103223
|
+
external: (external_prop_types_default()).bool
|
|
103224
|
+
}))
|
|
103225
|
+
}))
|
|
103226
|
+
});
|
|
103227
|
+
var signUpSignInPropTypes = {
|
|
103228
|
+
show: (external_prop_types_default()).bool,
|
|
103229
|
+
icon: (external_prop_types_default()).string,
|
|
103230
|
+
icon_color: (external_prop_types_default()).string,
|
|
103231
|
+
sign_up: authLinkPropType,
|
|
103232
|
+
sign_in: authLinkPropType,
|
|
103233
|
+
signed_in: authLinkPropType,
|
|
103234
|
+
profile_utility_links: profileUtilityLinksPropType,
|
|
103235
|
+
modal_copy: modalCopyPropType,
|
|
103236
|
+
authService: authServicePropType,
|
|
103237
|
+
customerData: (external_prop_types_default()).object,
|
|
103238
|
+
parent$: parentTagsPropType
|
|
103239
|
+
};
|
|
103240
|
+
;// ./src/components/signup-signin/SignUpSignIn.helpers.js
|
|
103241
|
+
function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = SignUpSignIn_helpers_unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
|
|
103242
|
+
function SignUpSignIn_helpers_unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return SignUpSignIn_helpers_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) ? SignUpSignIn_helpers_arrayLikeToArray(r, a) : void 0; } }
|
|
103243
|
+
function SignUpSignIn_helpers_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; }
|
|
103244
|
+
function SignUpSignIn_helpers_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; }
|
|
103245
|
+
function SignUpSignIn_helpers_objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? SignUpSignIn_helpers_ownKeys(Object(t), !0).forEach(function (r) { SignUpSignIn_helpers_defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : SignUpSignIn_helpers_ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
103246
|
+
function SignUpSignIn_helpers_defineProperty(e, r, t) { return (r = SignUpSignIn_helpers_toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
103247
|
+
function SignUpSignIn_helpers_toPropertyKey(t) { var i = SignUpSignIn_helpers_toPrimitive(t, "string"); return "symbol" == SignUpSignIn_helpers_typeof(i) ? i : i + ""; }
|
|
103248
|
+
function SignUpSignIn_helpers_toPrimitive(t, r) { if ("object" != SignUpSignIn_helpers_typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != SignUpSignIn_helpers_typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
103249
|
+
function SignUpSignIn_helpers_typeof(o) { "@babel/helpers - typeof"; return SignUpSignIn_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; }, SignUpSignIn_helpers_typeof(o); }
|
|
103165
103250
|
var DEFAULT_SIGN_UP = {
|
|
103166
103251
|
title: "Sign Up",
|
|
103167
103252
|
url: ""
|
|
@@ -103170,7 +103255,54 @@ var DEFAULT_SIGN_IN = {
|
|
|
103170
103255
|
title: "Sign In",
|
|
103171
103256
|
url: ""
|
|
103172
103257
|
};
|
|
103258
|
+
var DEFAULT_SIGNED_IN = {
|
|
103259
|
+
title: "My Account",
|
|
103260
|
+
url: ""
|
|
103261
|
+
};
|
|
103173
103262
|
var DEFAULT_ICON = "userOutline";
|
|
103263
|
+
var DEFAULT_PROFILE_PHOTO = "https://www.shutterstock.com/image-vector/person-gray-photo-placeholder-woman-600nw-1241538838.jpg";
|
|
103264
|
+
var DEFAULT_PROFILE_UTILITY_LINKS = {
|
|
103265
|
+
wallet_url: "/myaccount/wallet",
|
|
103266
|
+
quick_links: [{
|
|
103267
|
+
title: "My Account",
|
|
103268
|
+
links: [{
|
|
103269
|
+
label: "Account Settings",
|
|
103270
|
+
url: "/myaccount/accountprofile"
|
|
103271
|
+
}]
|
|
103272
|
+
}, {
|
|
103273
|
+
title: "Orders",
|
|
103274
|
+
links: [{
|
|
103275
|
+
label: "Subscriptions",
|
|
103276
|
+
url: "/myaccount/subscriptions"
|
|
103277
|
+
}, {
|
|
103278
|
+
label: "History",
|
|
103279
|
+
url: "/myaccount/orderhistory"
|
|
103280
|
+
}]
|
|
103281
|
+
}, {
|
|
103282
|
+
title: "My Business",
|
|
103283
|
+
affiliate_only: true,
|
|
103284
|
+
links: [{
|
|
103285
|
+
label: "Volumes & Genealogy",
|
|
103286
|
+
url: "/account/volumes",
|
|
103287
|
+
external: true
|
|
103288
|
+
}, {
|
|
103289
|
+
label: "My Site",
|
|
103290
|
+
url: "/myaccount/mysite"
|
|
103291
|
+
}, {
|
|
103292
|
+
label: "Product Offer",
|
|
103293
|
+
url: "/account/product-offers"
|
|
103294
|
+
}, {
|
|
103295
|
+
label: "Sign-Up Invite",
|
|
103296
|
+
url: "/account/sign-up-invite",
|
|
103297
|
+
external: true
|
|
103298
|
+
}, {
|
|
103299
|
+
label: "Info Center",
|
|
103300
|
+
url: "/account/info-center",
|
|
103301
|
+
external: true
|
|
103302
|
+
}]
|
|
103303
|
+
}]
|
|
103304
|
+
};
|
|
103305
|
+
var ACCOUNT_TOGGLE_NAME_MAX_LENGTH = 12;
|
|
103174
103306
|
var ALLOWED_ICON_NAMES = new Set(["userOutline", "userIcon"]);
|
|
103175
103307
|
var ICON_COLOR_MAP = {
|
|
103176
103308
|
black: "#000000",
|
|
@@ -103206,6 +103338,188 @@ function getEffectiveAuthDisplay(resolvedLinks, sign_up, sign_in) {
|
|
|
103206
103338
|
effectiveSignInTitle: (_effectiveSignIn$titl = effectiveSignIn === null || effectiveSignIn === void 0 ? void 0 : effectiveSignIn.title) !== null && _effectiveSignIn$titl !== void 0 ? _effectiveSignIn$titl : signInTitle
|
|
103207
103339
|
};
|
|
103208
103340
|
}
|
|
103341
|
+
function pickFirstTruthyString() {
|
|
103342
|
+
for (var _len = arguments.length, values = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
103343
|
+
values[_key] = arguments[_key];
|
|
103344
|
+
}
|
|
103345
|
+
for (var _i = 0, _values = values; _i < _values.length; _i++) {
|
|
103346
|
+
var value = _values[_i];
|
|
103347
|
+
if (typeof value !== "string") continue;
|
|
103348
|
+
var trimmed = value.trim();
|
|
103349
|
+
if (trimmed) return trimmed;
|
|
103350
|
+
}
|
|
103351
|
+
return "";
|
|
103352
|
+
}
|
|
103353
|
+
function isAuthenticatedCustomer(customerData) {
|
|
103354
|
+
if (!customerData || SignUpSignIn_helpers_typeof(customerData) !== "object") return false;
|
|
103355
|
+
return Boolean(customerData.isAuthenticated || customerData.isRegisterUser || customerData.isRegisteredUser || customerData.authenticated);
|
|
103356
|
+
}
|
|
103357
|
+
function getCustomerProfileSummary(customerData) {
|
|
103358
|
+
var _customerData$account, _customerData$custome;
|
|
103359
|
+
if (!customerData || SignUpSignIn_helpers_typeof(customerData) !== "object") {
|
|
103360
|
+
return {
|
|
103361
|
+
displayName: "",
|
|
103362
|
+
email: "",
|
|
103363
|
+
accountId: ""
|
|
103364
|
+
};
|
|
103365
|
+
}
|
|
103366
|
+
var displayName = getCustomerDisplayName(customerData);
|
|
103367
|
+
var email = pickFirstTruthyString(customerData.email, customerData.userName, customerData.phoneNumber);
|
|
103368
|
+
var accountId = pickFirstTruthyString(customerData.referenceAttribute, (_customerData$account = customerData.accounts) === null || _customerData$account === void 0 ? void 0 : _customerData$account.referenceAttribute, customerData.nuskinAccountId, (_customerData$custome = customerData.customer) === null || _customerData$custome === void 0 ? void 0 : _customerData$custome.referenceAttribute);
|
|
103369
|
+
return {
|
|
103370
|
+
displayName: displayName,
|
|
103371
|
+
email: email,
|
|
103372
|
+
accountId: accountId
|
|
103373
|
+
};
|
|
103374
|
+
}
|
|
103375
|
+
function getCustomerDisplayName(customerData) {
|
|
103376
|
+
if (!customerData || SignUpSignIn_helpers_typeof(customerData) !== "object") return "";
|
|
103377
|
+
var firstAndLast = pickFirstTruthyString([customerData.firstName, customerData.lastName].filter(Boolean).join(" "));
|
|
103378
|
+
return pickFirstTruthyString(customerData.displayName, customerData.fullName, customerData.name, firstAndLast, customerData.firstName);
|
|
103379
|
+
}
|
|
103380
|
+
function getCustomerFirstName(customerData) {
|
|
103381
|
+
if (!customerData || SignUpSignIn_helpers_typeof(customerData) !== "object") return "";
|
|
103382
|
+
return pickFirstTruthyString(customerData.firstName);
|
|
103383
|
+
}
|
|
103384
|
+
function formatAccountToggleLabel(name) {
|
|
103385
|
+
var text = String(name !== null && name !== void 0 ? name : "").trim();
|
|
103386
|
+
if (!text) return "";
|
|
103387
|
+
var upper = text.toUpperCase();
|
|
103388
|
+
if (upper.length > ACCOUNT_TOGGLE_NAME_MAX_LENGTH) {
|
|
103389
|
+
return "".concat(upper.slice(0, ACCOUNT_TOGGLE_NAME_MAX_LENGTH - 1), "...");
|
|
103390
|
+
}
|
|
103391
|
+
return upper;
|
|
103392
|
+
}
|
|
103393
|
+
function formatProfileGreetingName(name) {
|
|
103394
|
+
return String(name !== null && name !== void 0 ? name : "").trim().toUpperCase();
|
|
103395
|
+
}
|
|
103396
|
+
function getCustomerAccountType(customerData) {
|
|
103397
|
+
var _customerData$account2, _customerData$custome2;
|
|
103398
|
+
if (!customerData || SignUpSignIn_helpers_typeof(customerData) !== "object") return "";
|
|
103399
|
+
return pickFirstTruthyString(customerData.type, customerData.accountType, (_customerData$account2 = customerData.accounts) === null || _customerData$account2 === void 0 ? void 0 : _customerData$account2.accountType, (_customerData$custome2 = customerData.customer) === null || _customerData$custome2 === void 0 ? void 0 : _customerData$custome2.type);
|
|
103400
|
+
}
|
|
103401
|
+
function isBrandAffiliateCustomer(customerData) {
|
|
103402
|
+
return getCustomerAccountType(customerData) === "Brand Affiliate";
|
|
103403
|
+
}
|
|
103404
|
+
function getCustomerPhotoUrl(customerData) {
|
|
103405
|
+
var _customerData$custome3;
|
|
103406
|
+
if (!customerData || SignUpSignIn_helpers_typeof(customerData) !== "object") return "";
|
|
103407
|
+
return pickFirstTruthyString(customerData.photo, customerData.profilePhoto, (_customerData$custome3 = customerData.customer) === null || _customerData$custome3 === void 0 ? void 0 : _customerData$custome3.photo);
|
|
103408
|
+
}
|
|
103409
|
+
function normalizeProfileLinkEntry(entry) {
|
|
103410
|
+
if (!entry || SignUpSignIn_helpers_typeof(entry) !== "object") return null;
|
|
103411
|
+
var label = pickFirstTruthyString(entry.label, entry.title, entry.text);
|
|
103412
|
+
var url = pickFirstTruthyString(entry.url, entry.href, entry.link);
|
|
103413
|
+
if (!label || !url) return null;
|
|
103414
|
+
return {
|
|
103415
|
+
label: label,
|
|
103416
|
+
url: url,
|
|
103417
|
+
external: Boolean(entry.external || entry.is_external || entry.open_in_new_tab)
|
|
103418
|
+
};
|
|
103419
|
+
}
|
|
103420
|
+
function normalizeProfileLinkGroup(entries) {
|
|
103421
|
+
if (!Array.isArray(entries)) return [];
|
|
103422
|
+
return entries.map(normalizeProfileLinkEntry).filter(Boolean);
|
|
103423
|
+
}
|
|
103424
|
+
function normalizeQuickLinkGroup(group) {
|
|
103425
|
+
if (!group || SignUpSignIn_helpers_typeof(group) !== "object") return null;
|
|
103426
|
+
var title = pickFirstTruthyString(group.title, group.heading);
|
|
103427
|
+
var links = normalizeProfileLinkGroup(group.links || group.items);
|
|
103428
|
+
if (!title || !links.length) return null;
|
|
103429
|
+
return {
|
|
103430
|
+
title: title,
|
|
103431
|
+
links: links,
|
|
103432
|
+
affiliateOnly: Boolean(group.affiliate_only || group.affiliateOnly)
|
|
103433
|
+
};
|
|
103434
|
+
}
|
|
103435
|
+
function getProfileWalletSummary(customerData) {
|
|
103436
|
+
var _ref, _ref2, _customerData$storeCr, _customerData$wallet, _ref3, _ref4, _customerData$availab, _customerData$wallet2;
|
|
103437
|
+
if (!customerData || SignUpSignIn_helpers_typeof(customerData) !== "object") {
|
|
103438
|
+
return {
|
|
103439
|
+
storeCredit: 0,
|
|
103440
|
+
promoCount: 0
|
|
103441
|
+
};
|
|
103442
|
+
}
|
|
103443
|
+
var storeCredit = Number((_ref = (_ref2 = (_customerData$storeCr = customerData.storeCreditPoints) !== null && _customerData$storeCr !== void 0 ? _customerData$storeCr : customerData.storeCredit) !== null && _ref2 !== void 0 ? _ref2 : (_customerData$wallet = customerData.wallet) === null || _customerData$wallet === void 0 ? void 0 : _customerData$wallet.credit) !== null && _ref !== void 0 ? _ref : 0);
|
|
103444
|
+
var promoCount = Number((_ref3 = (_ref4 = (_customerData$availab = customerData.availablePromoCodes) !== null && _customerData$availab !== void 0 ? _customerData$availab : customerData.promoCount) !== null && _ref4 !== void 0 ? _ref4 : (_customerData$wallet2 = customerData.wallet) === null || _customerData$wallet2 === void 0 ? void 0 : _customerData$wallet2.promos) !== null && _ref3 !== void 0 ? _ref3 : 0);
|
|
103445
|
+
return {
|
|
103446
|
+
storeCredit: Number.isFinite(storeCredit) ? storeCredit : 0,
|
|
103447
|
+
promoCount: Number.isFinite(promoCount) ? promoCount : 0
|
|
103448
|
+
};
|
|
103449
|
+
}
|
|
103450
|
+
function getProfileVolumeStats(customerData) {
|
|
103451
|
+
var _customerData$customP, _customerData$customP2, _customerData$customP3;
|
|
103452
|
+
if (!customerData || SignUpSignIn_helpers_typeof(customerData) !== "object") {
|
|
103453
|
+
return {
|
|
103454
|
+
dcSv: "",
|
|
103455
|
+
gsv: ""
|
|
103456
|
+
};
|
|
103457
|
+
}
|
|
103458
|
+
var dcSv = pickFirstTruthyString(customerData.dcSv, customerData.dc_sv, (_customerData$customP = customerData.customProperties) === null || _customerData$customP === void 0 ? void 0 : _customerData$customP.dcSv, (_customerData$customP2 = customerData.customProperties) === null || _customerData$customP2 === void 0 ? void 0 : _customerData$customP2.dc_sv);
|
|
103459
|
+
var gsv = pickFirstTruthyString(customerData.gsv, (_customerData$customP3 = customerData.customProperties) === null || _customerData$customP3 === void 0 ? void 0 : _customerData$customP3.gsv);
|
|
103460
|
+
return {
|
|
103461
|
+
dcSv: dcSv,
|
|
103462
|
+
gsv: gsv
|
|
103463
|
+
};
|
|
103464
|
+
}
|
|
103465
|
+
function resolveProfileUtilityLinks(profileUtilityLinks) {
|
|
103466
|
+
var source = profileUtilityLinks && SignUpSignIn_helpers_typeof(profileUtilityLinks) === "object" ? profileUtilityLinks : DEFAULT_PROFILE_UTILITY_LINKS;
|
|
103467
|
+
var quickLinksSource = source.quick_links || source.quickLinks || (source.my_account || source.myAccount || source.my_business || source.myBusiness ? [{
|
|
103468
|
+
title: "My Account",
|
|
103469
|
+
links: source.my_account || source.myAccount || []
|
|
103470
|
+
}, {
|
|
103471
|
+
title: "Orders",
|
|
103472
|
+
links: []
|
|
103473
|
+
}, {
|
|
103474
|
+
title: "My Business",
|
|
103475
|
+
affiliate_only: true,
|
|
103476
|
+
links: source.my_business || source.myBusiness || []
|
|
103477
|
+
}] : DEFAULT_PROFILE_UTILITY_LINKS.quick_links);
|
|
103478
|
+
return {
|
|
103479
|
+
walletUrl: pickFirstTruthyString(source.wallet_url, source.walletUrl, DEFAULT_PROFILE_UTILITY_LINKS.wallet_url),
|
|
103480
|
+
quickLinkGroups: (Array.isArray(quickLinksSource) ? quickLinksSource : []).map(normalizeQuickLinkGroup).filter(Boolean)
|
|
103481
|
+
};
|
|
103482
|
+
}
|
|
103483
|
+
var DEFAULT_SIGN_UP_PATH = "/site/signup";
|
|
103484
|
+
function resolveDefaultSignUpPath() {
|
|
103485
|
+
return resolveLocalizedStorefrontPath(DEFAULT_SIGN_UP_PATH);
|
|
103486
|
+
}
|
|
103487
|
+
var LOCALE_PATH_PREFIX_REGEX = /^\/([a-z]{2})\/([a-z]{2})(?=\/|$)/i;
|
|
103488
|
+
function resolveLocalizedStorefrontPath(path) {
|
|
103489
|
+
var raw = String(path !== null && path !== void 0 ? path : "").trim();
|
|
103490
|
+
if (!raw || /^https?:\/\//i.test(raw)) return raw;
|
|
103491
|
+
var normalized = raw.startsWith("/") ? raw : "/".concat(raw);
|
|
103492
|
+
if (typeof globalThis.window === "undefined") return normalized;
|
|
103493
|
+
var localeMatch = LOCALE_PATH_PREFIX_REGEX.exec(globalThis.window.location.pathname);
|
|
103494
|
+
if (!localeMatch) return normalized;
|
|
103495
|
+
var prefix = "/".concat(localeMatch[1], "/").concat(localeMatch[2]);
|
|
103496
|
+
if (normalized === prefix || normalized.startsWith("".concat(prefix, "/"))) {
|
|
103497
|
+
return normalized;
|
|
103498
|
+
}
|
|
103499
|
+
return "".concat(prefix).concat(normalized);
|
|
103500
|
+
}
|
|
103501
|
+
function getAuthDisplayState(_ref5) {
|
|
103502
|
+
var _effectiveSignedIn$ur;
|
|
103503
|
+
var resolvedLinks = _ref5.resolvedLinks,
|
|
103504
|
+
sign_up = _ref5.sign_up,
|
|
103505
|
+
sign_in = _ref5.sign_in,
|
|
103506
|
+
signed_in = _ref5.signed_in,
|
|
103507
|
+
customerData = _ref5.customerData;
|
|
103508
|
+
var guestDisplay = getEffectiveAuthDisplay(resolvedLinks, sign_up, sign_in);
|
|
103509
|
+
var effectiveSignedIn = (resolvedLinks === null || resolvedLinks === void 0 ? void 0 : resolvedLinks.signed_in) || (resolvedLinks === null || resolvedLinks === void 0 ? void 0 : resolvedLinks.signedIn) || signed_in;
|
|
103510
|
+
var isAuthenticated = isAuthenticatedCustomer(customerData);
|
|
103511
|
+
var accountTitle = pickFirstTruthyString(effectiveSignedIn === null || effectiveSignedIn === void 0 ? void 0 : effectiveSignedIn.title, getCustomerDisplayName(customerData), DEFAULT_SIGNED_IN.title);
|
|
103512
|
+
var firstName = getCustomerFirstName(customerData);
|
|
103513
|
+
var accountToggleLabel = isAuthenticated && firstName ? formatAccountToggleLabel(firstName) : accountTitle;
|
|
103514
|
+
return SignUpSignIn_helpers_objectSpread(SignUpSignIn_helpers_objectSpread({}, guestDisplay), {}, {
|
|
103515
|
+
isAuthenticated: isAuthenticated,
|
|
103516
|
+
showGuestAuth: !isAuthenticated,
|
|
103517
|
+
accountTitle: accountTitle,
|
|
103518
|
+
accountToggleLabel: accountToggleLabel,
|
|
103519
|
+
accountUrl: (_effectiveSignedIn$ur = effectiveSignedIn === null || effectiveSignedIn === void 0 ? void 0 : effectiveSignedIn.url) !== null && _effectiveSignedIn$ur !== void 0 ? _effectiveSignedIn$ur : DEFAULT_SIGNED_IN.url,
|
|
103520
|
+
effectiveSignedIn: effectiveSignedIn
|
|
103521
|
+
});
|
|
103522
|
+
}
|
|
103209
103523
|
function getIconPresentation(icon, icon_color) {
|
|
103210
103524
|
var normalizedIconName = String(icon !== null && icon !== void 0 ? icon : DEFAULT_ICON).trim();
|
|
103211
103525
|
var resolvedIconName = ALLOWED_ICON_NAMES.has(normalizedIconName) ? normalizedIconName : DEFAULT_ICON;
|
|
@@ -103215,49 +103529,146 @@ function getIconPresentation(icon, icon_color) {
|
|
|
103215
103529
|
resolvedIconColor: ICON_COLOR_MAP[normalizedColorName]
|
|
103216
103530
|
};
|
|
103217
103531
|
}
|
|
103218
|
-
|
|
103532
|
+
var AUTH_ACTION_ALIASES = {
|
|
103533
|
+
navigateToSignIn: ["navigateToSignIn", "signIn"],
|
|
103534
|
+
navigateToSignUp: ["navigateToSignUp", "signUp"],
|
|
103535
|
+
navigateToAccount: ["navigateToAccount", "account"],
|
|
103536
|
+
signOut: ["signOut", "navigateToSignOut"]
|
|
103537
|
+
};
|
|
103538
|
+
function getWindowHeaderAuthBridge() {
|
|
103539
|
+
if (typeof globalThis.window === "undefined") return null;
|
|
103540
|
+
var bridge = globalThis.window.__NUSKIN_HEADER_AUTH__;
|
|
103541
|
+
return bridge && SignUpSignIn_helpers_typeof(bridge) === "object" ? bridge : null;
|
|
103542
|
+
}
|
|
103543
|
+
function invokeAuthHandler(handler, url) {
|
|
103544
|
+
var _ref6 = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {},
|
|
103545
|
+
_ref6$passUrl = _ref6.passUrl,
|
|
103546
|
+
passUrl = _ref6$passUrl === void 0 ? false : _ref6$passUrl;
|
|
103547
|
+
if (passUrl) {
|
|
103548
|
+
var resolvedUrl = String(url !== null && url !== void 0 ? url : "").trim();
|
|
103549
|
+
if (resolvedUrl) {
|
|
103550
|
+
handler(resolvedUrl);
|
|
103551
|
+
return;
|
|
103552
|
+
}
|
|
103553
|
+
}
|
|
103554
|
+
handler();
|
|
103555
|
+
}
|
|
103556
|
+
function delegateAuthNavigation(authService, methodName, url) {
|
|
103557
|
+
var keys = AUTH_ACTION_ALIASES[methodName] || [methodName];
|
|
103558
|
+
var sources = [authService, getWindowHeaderAuthBridge()].filter(Boolean);
|
|
103559
|
+
var passUrl = methodName === "navigateToAccount";
|
|
103560
|
+
var _iterator = _createForOfIteratorHelper(sources),
|
|
103561
|
+
_step;
|
|
103562
|
+
try {
|
|
103563
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
103564
|
+
var source = _step.value;
|
|
103565
|
+
var _iterator2 = _createForOfIteratorHelper(keys),
|
|
103566
|
+
_step2;
|
|
103567
|
+
try {
|
|
103568
|
+
for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
|
|
103569
|
+
var key = _step2.value;
|
|
103570
|
+
var handler = source === null || source === void 0 ? void 0 : source[key];
|
|
103571
|
+
if (typeof handler === "function") {
|
|
103572
|
+
invokeAuthHandler(handler, url, {
|
|
103573
|
+
passUrl: passUrl
|
|
103574
|
+
});
|
|
103575
|
+
return true;
|
|
103576
|
+
}
|
|
103577
|
+
}
|
|
103578
|
+
} catch (err) {
|
|
103579
|
+
_iterator2.e(err);
|
|
103580
|
+
} finally {
|
|
103581
|
+
_iterator2.f();
|
|
103582
|
+
}
|
|
103583
|
+
}
|
|
103584
|
+
} catch (err) {
|
|
103585
|
+
_iterator.e(err);
|
|
103586
|
+
} finally {
|
|
103587
|
+
_iterator.f();
|
|
103588
|
+
}
|
|
103589
|
+
return false;
|
|
103590
|
+
}
|
|
103591
|
+
function handleSignUpNavigate(editing, url, authService) {
|
|
103219
103592
|
if (editing) return;
|
|
103220
|
-
|
|
103593
|
+
if (delegateAuthNavigation(authService, "navigateToSignUp", url)) return;
|
|
103594
|
+
navigateToUrl(resolveDefaultSignUpPath());
|
|
103221
103595
|
}
|
|
103222
|
-
function handleSignInActivate(editing, isMobile, setIsModalOpen, url) {
|
|
103596
|
+
function handleSignInActivate(editing, isMobile, setIsModalOpen, url, authService) {
|
|
103223
103597
|
if (editing) return;
|
|
103224
103598
|
if (isMobile) {
|
|
103225
103599
|
setIsModalOpen(true);
|
|
103226
103600
|
return;
|
|
103227
103601
|
}
|
|
103602
|
+
if (delegateAuthNavigation(authService, "navigateToSignIn", url)) return;
|
|
103228
103603
|
navigateToUrl(url);
|
|
103229
103604
|
}
|
|
103230
|
-
function
|
|
103605
|
+
function handleAccountNavigate(editing, url, authService) {
|
|
103606
|
+
if (editing) return;
|
|
103607
|
+
var resolvedUrl = resolveLocalizedStorefrontPath(url);
|
|
103608
|
+
if (delegateAuthNavigation(authService, "navigateToAccount", resolvedUrl)) {
|
|
103609
|
+
return;
|
|
103610
|
+
}
|
|
103611
|
+
navigateToUrl(resolvedUrl);
|
|
103612
|
+
}
|
|
103613
|
+
function handleProfileLinkNavigate(editing, url, authService) {
|
|
103614
|
+
var _ref7 = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {},
|
|
103615
|
+
_ref7$external = _ref7.external,
|
|
103616
|
+
external = _ref7$external === void 0 ? false : _ref7$external;
|
|
103617
|
+
if (editing) return;
|
|
103618
|
+
var resolvedUrl = resolveLocalizedStorefrontPath(url);
|
|
103619
|
+
if (external || /^https?:\/\//i.test(resolvedUrl)) {
|
|
103620
|
+
if (typeof globalThis.window !== "undefined") {
|
|
103621
|
+
globalThis.window.open(resolvedUrl, "_blank", "noopener,noreferrer");
|
|
103622
|
+
}
|
|
103623
|
+
return;
|
|
103624
|
+
}
|
|
103625
|
+
if (delegateAuthNavigation(authService, "navigateToAccount", resolvedUrl)) {
|
|
103626
|
+
return;
|
|
103627
|
+
}
|
|
103628
|
+
navigateToUrl(resolvedUrl);
|
|
103629
|
+
}
|
|
103630
|
+
function handleSignOutNavigate(editing, authService) {
|
|
103631
|
+
if (editing) return;
|
|
103632
|
+
delegateAuthNavigation(authService, "signOut");
|
|
103633
|
+
}
|
|
103634
|
+
function handleModalAuthNavigate(editing, closeModal, url, authService, methodName) {
|
|
103231
103635
|
if (editing) return;
|
|
103232
103636
|
closeModal();
|
|
103637
|
+
if (delegateAuthNavigation(authService, methodName, url)) return;
|
|
103638
|
+
if (methodName === "navigateToSignUp") {
|
|
103639
|
+
navigateToUrl(resolveDefaultSignUpPath());
|
|
103640
|
+
return;
|
|
103641
|
+
}
|
|
103233
103642
|
navigateToUrl(url);
|
|
103234
103643
|
}
|
|
103235
|
-
function mergeAuthLinksFromService(links, sign_up, sign_in) {
|
|
103644
|
+
function mergeAuthLinksFromService(links, sign_up, sign_in, signed_in) {
|
|
103236
103645
|
if (!links) return {
|
|
103237
103646
|
sign_up: sign_up,
|
|
103238
|
-
sign_in: sign_in
|
|
103647
|
+
sign_in: sign_in,
|
|
103648
|
+
signed_in: signed_in
|
|
103239
103649
|
};
|
|
103240
103650
|
return {
|
|
103241
103651
|
sign_up: links.sign_up || links.signUp || sign_up,
|
|
103242
|
-
sign_in: links.sign_in || links.signIn || sign_in
|
|
103652
|
+
sign_in: links.sign_in || links.signIn || sign_in,
|
|
103653
|
+
signed_in: links.signed_in || links.signedIn || signed_in
|
|
103243
103654
|
};
|
|
103244
103655
|
}
|
|
103245
|
-
;// ./src/components/signup-signin/
|
|
103246
|
-
function
|
|
103247
|
-
function
|
|
103248
|
-
function
|
|
103249
|
-
function
|
|
103250
|
-
function
|
|
103251
|
-
function
|
|
103252
|
-
function
|
|
103253
|
-
function
|
|
103254
|
-
function
|
|
103255
|
-
function
|
|
103656
|
+
;// ./src/components/signup-signin/SignUpSignIn.hooks.js
|
|
103657
|
+
function SignUpSignIn_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 SignUpSignIn_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]())) : (SignUpSignIn_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, SignUpSignIn_hooks_regeneratorDefine2(e, o, "GeneratorFunction")), e.prototype = Object.create(u), e; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, SignUpSignIn_hooks_regeneratorDefine2(u, "constructor", GeneratorFunctionPrototype), SignUpSignIn_hooks_regeneratorDefine2(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = "GeneratorFunction", SignUpSignIn_hooks_regeneratorDefine2(GeneratorFunctionPrototype, o, "GeneratorFunction"), SignUpSignIn_hooks_regeneratorDefine2(u), SignUpSignIn_hooks_regeneratorDefine2(u, o, "Generator"), SignUpSignIn_hooks_regeneratorDefine2(u, n, function () { return this; }), SignUpSignIn_hooks_regeneratorDefine2(u, "toString", function () { return "[object Generator]"; }), (SignUpSignIn_hooks_regenerator = function _regenerator() { return { w: i, m: f }; })(); }
|
|
103658
|
+
function SignUpSignIn_hooks_regeneratorDefine2(e, r, n, t) { var i = Object.defineProperty; try { i({}, "", {}); } catch (e) { i = 0; } SignUpSignIn_hooks_regeneratorDefine2 = function _regeneratorDefine(e, r, n, t) { function o(r, n) { SignUpSignIn_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)); }, SignUpSignIn_hooks_regeneratorDefine2(e, r, n, t); }
|
|
103659
|
+
function SignUpSignIn_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); }
|
|
103660
|
+
function SignUpSignIn_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) { SignUpSignIn_hooks_asyncGeneratorStep(a, r, o, _next, _throw, "next", n); } function _throw(n) { SignUpSignIn_hooks_asyncGeneratorStep(a, r, o, _next, _throw, "throw", n); } _next(void 0); }); }; }
|
|
103661
|
+
function SignUpSignIn_hooks_slicedToArray(r, e) { return SignUpSignIn_hooks_arrayWithHoles(r) || SignUpSignIn_hooks_iterableToArrayLimit(r, e) || SignUpSignIn_hooks_unsupportedIterableToArray(r, e) || SignUpSignIn_hooks_nonIterableRest(); }
|
|
103662
|
+
function SignUpSignIn_hooks_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."); }
|
|
103663
|
+
function SignUpSignIn_hooks_unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return SignUpSignIn_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) ? SignUpSignIn_hooks_arrayLikeToArray(r, a) : void 0; } }
|
|
103664
|
+
function SignUpSignIn_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; }
|
|
103665
|
+
function SignUpSignIn_hooks_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; } }
|
|
103666
|
+
function SignUpSignIn_hooks_arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
|
103256
103667
|
|
|
103257
103668
|
|
|
103258
103669
|
function useIsMobileViewport() {
|
|
103259
103670
|
var _useState = (0,external_react_.useState)(false),
|
|
103260
|
-
_useState2 =
|
|
103671
|
+
_useState2 = SignUpSignIn_hooks_slicedToArray(_useState, 2),
|
|
103261
103672
|
isMobile = _useState2[0],
|
|
103262
103673
|
setIsMobile = _useState2[1];
|
|
103263
103674
|
(0,external_react_.useEffect)(function () {
|
|
@@ -103275,27 +103686,29 @@ function useIsMobileViewport() {
|
|
|
103275
103686
|
}, []);
|
|
103276
103687
|
return isMobile;
|
|
103277
103688
|
}
|
|
103278
|
-
function useResolvedAuthLinks(sign_up, sign_in, authService) {
|
|
103689
|
+
function useResolvedAuthLinks(sign_up, sign_in, signed_in, authService) {
|
|
103279
103690
|
var _useState3 = (0,external_react_.useState)({
|
|
103280
103691
|
sign_up: sign_up,
|
|
103281
|
-
sign_in: sign_in
|
|
103692
|
+
sign_in: sign_in,
|
|
103693
|
+
signed_in: signed_in
|
|
103282
103694
|
}),
|
|
103283
|
-
_useState4 =
|
|
103695
|
+
_useState4 = SignUpSignIn_hooks_slicedToArray(_useState3, 2),
|
|
103284
103696
|
resolvedLinks = _useState4[0],
|
|
103285
103697
|
setResolvedLinks = _useState4[1];
|
|
103286
103698
|
(0,external_react_.useEffect)(function () {
|
|
103287
103699
|
setResolvedLinks({
|
|
103288
103700
|
sign_up: sign_up,
|
|
103289
|
-
sign_in: sign_in
|
|
103701
|
+
sign_in: sign_in,
|
|
103702
|
+
signed_in: signed_in
|
|
103290
103703
|
});
|
|
103291
|
-
}, [sign_up, sign_in]);
|
|
103704
|
+
}, [sign_up, sign_in, signed_in]);
|
|
103292
103705
|
(0,external_react_.useEffect)(function () {
|
|
103293
103706
|
var canceled = false;
|
|
103294
103707
|
var canResolve = typeof (authService === null || authService === void 0 ? void 0 : authService.getAuthLinks) === "function";
|
|
103295
103708
|
if (!canResolve) return undefined;
|
|
103296
|
-
|
|
103709
|
+
SignUpSignIn_hooks_asyncToGenerator(/*#__PURE__*/SignUpSignIn_hooks_regenerator().m(function _callee() {
|
|
103297
103710
|
var links, _t;
|
|
103298
|
-
return
|
|
103711
|
+
return SignUpSignIn_hooks_regenerator().w(function (_context) {
|
|
103299
103712
|
while (1) switch (_context.p = _context.n) {
|
|
103300
103713
|
case 0:
|
|
103301
103714
|
_context.p = 0;
|
|
@@ -103304,7 +103717,7 @@ function useResolvedAuthLinks(sign_up, sign_in, authService) {
|
|
|
103304
103717
|
case 1:
|
|
103305
103718
|
links = _context.v;
|
|
103306
103719
|
if (!canceled && links) {
|
|
103307
|
-
setResolvedLinks(mergeAuthLinksFromService(links, sign_up, sign_in));
|
|
103720
|
+
setResolvedLinks(mergeAuthLinksFromService(links, sign_up, sign_in, signed_in));
|
|
103308
103721
|
}
|
|
103309
103722
|
_context.n = 3;
|
|
103310
103723
|
break;
|
|
@@ -103319,7 +103732,7 @@ function useResolvedAuthLinks(sign_up, sign_in, authService) {
|
|
|
103319
103732
|
return function () {
|
|
103320
103733
|
canceled = true;
|
|
103321
103734
|
};
|
|
103322
|
-
}, [authService, sign_in, sign_up]);
|
|
103735
|
+
}, [authService, sign_in, sign_up, signed_in]);
|
|
103323
103736
|
return resolvedLinks;
|
|
103324
103737
|
}
|
|
103325
103738
|
function useEscapeToCloseModal(isModalOpen, setIsModalOpen) {
|
|
@@ -103337,290 +103750,1294 @@ function useEscapeToCloseModal(isModalOpen, setIsModalOpen) {
|
|
|
103337
103750
|
};
|
|
103338
103751
|
}, [isModalOpen, setIsModalOpen]);
|
|
103339
103752
|
}
|
|
103340
|
-
|
|
103753
|
+
function useAccountMenuState() {
|
|
103754
|
+
var _useState5 = (0,external_react_.useState)(false),
|
|
103755
|
+
_useState6 = SignUpSignIn_hooks_slicedToArray(_useState5, 2),
|
|
103756
|
+
isAccountMenuOpen = _useState6[0],
|
|
103757
|
+
setIsAccountMenuOpen = _useState6[1];
|
|
103758
|
+
var menuRef = (0,external_react_.useRef)(null);
|
|
103759
|
+
(0,external_react_.useEffect)(function () {
|
|
103760
|
+
var _globalThis$document;
|
|
103761
|
+
if (!isAccountMenuOpen) return undefined;
|
|
103762
|
+
var onPointerDown = function onPointerDown(event) {
|
|
103763
|
+
var _menuRef$current;
|
|
103764
|
+
if (!((_menuRef$current = menuRef.current) !== null && _menuRef$current !== void 0 && _menuRef$current.contains(event.target))) {
|
|
103765
|
+
setIsAccountMenuOpen(false);
|
|
103766
|
+
}
|
|
103767
|
+
};
|
|
103768
|
+
(_globalThis$document = globalThis.document) === null || _globalThis$document === void 0 || _globalThis$document.addEventListener("mousedown", onPointerDown);
|
|
103769
|
+
return function () {
|
|
103770
|
+
var _globalThis$document2;
|
|
103771
|
+
return (_globalThis$document2 = globalThis.document) === null || _globalThis$document2 === void 0 ? void 0 : _globalThis$document2.removeEventListener("mousedown", onPointerDown);
|
|
103772
|
+
};
|
|
103773
|
+
}, [isAccountMenuOpen]);
|
|
103774
|
+
useEscapeToCloseModal(isAccountMenuOpen, setIsAccountMenuOpen);
|
|
103775
|
+
return {
|
|
103776
|
+
isAccountMenuOpen: isAccountMenuOpen,
|
|
103777
|
+
setIsAccountMenuOpen: setIsAccountMenuOpen,
|
|
103778
|
+
menuRef: menuRef
|
|
103779
|
+
};
|
|
103780
|
+
}
|
|
103781
|
+
;// ./src/components/signup-signin/useSignUpSignIn.js
|
|
103782
|
+
function useSignUpSignIn_typeof(o) { "@babel/helpers - typeof"; return useSignUpSignIn_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; }, useSignUpSignIn_typeof(o); }
|
|
103783
|
+
function useSignUpSignIn_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 useSignUpSignIn_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]())) : (useSignUpSignIn_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, useSignUpSignIn_regeneratorDefine2(e, o, "GeneratorFunction")), e.prototype = Object.create(u), e; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, useSignUpSignIn_regeneratorDefine2(u, "constructor", GeneratorFunctionPrototype), useSignUpSignIn_regeneratorDefine2(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = "GeneratorFunction", useSignUpSignIn_regeneratorDefine2(GeneratorFunctionPrototype, o, "GeneratorFunction"), useSignUpSignIn_regeneratorDefine2(u), useSignUpSignIn_regeneratorDefine2(u, o, "Generator"), useSignUpSignIn_regeneratorDefine2(u, n, function () { return this; }), useSignUpSignIn_regeneratorDefine2(u, "toString", function () { return "[object Generator]"; }), (useSignUpSignIn_regenerator = function _regenerator() { return { w: i, m: f }; })(); }
|
|
103784
|
+
function useSignUpSignIn_regeneratorDefine2(e, r, n, t) { var i = Object.defineProperty; try { i({}, "", {}); } catch (e) { i = 0; } useSignUpSignIn_regeneratorDefine2 = function _regeneratorDefine(e, r, n, t) { function o(r, n) { useSignUpSignIn_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)); }, useSignUpSignIn_regeneratorDefine2(e, r, n, t); }
|
|
103785
|
+
function useSignUpSignIn_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); }
|
|
103786
|
+
function useSignUpSignIn_asyncToGenerator(n) { return function () { var t = this, e = arguments; return new Promise(function (r, o) { var a = n.apply(t, e); function _next(n) { useSignUpSignIn_asyncGeneratorStep(a, r, o, _next, _throw, "next", n); } function _throw(n) { useSignUpSignIn_asyncGeneratorStep(a, r, o, _next, _throw, "throw", n); } _next(void 0); }); }; }
|
|
103787
|
+
function useSignUpSignIn_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; }
|
|
103788
|
+
function useSignUpSignIn_objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? useSignUpSignIn_ownKeys(Object(t), !0).forEach(function (r) { useSignUpSignIn_defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : useSignUpSignIn_ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
103789
|
+
function useSignUpSignIn_defineProperty(e, r, t) { return (r = useSignUpSignIn_toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
103790
|
+
function useSignUpSignIn_toPropertyKey(t) { var i = useSignUpSignIn_toPrimitive(t, "string"); return "symbol" == useSignUpSignIn_typeof(i) ? i : i + ""; }
|
|
103791
|
+
function useSignUpSignIn_toPrimitive(t, r) { if ("object" != useSignUpSignIn_typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != useSignUpSignIn_typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
103792
|
+
function useSignUpSignIn_slicedToArray(r, e) { return useSignUpSignIn_arrayWithHoles(r) || useSignUpSignIn_iterableToArrayLimit(r, e) || useSignUpSignIn_unsupportedIterableToArray(r, e) || useSignUpSignIn_nonIterableRest(); }
|
|
103793
|
+
function useSignUpSignIn_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."); }
|
|
103794
|
+
function useSignUpSignIn_unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return useSignUpSignIn_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) ? useSignUpSignIn_arrayLikeToArray(r, a) : void 0; } }
|
|
103795
|
+
function useSignUpSignIn_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; }
|
|
103796
|
+
function useSignUpSignIn_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; } }
|
|
103797
|
+
function useSignUpSignIn_arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
|
103798
|
+
|
|
103799
|
+
|
|
103800
|
+
|
|
103801
|
+
|
|
103802
|
+
var DEFAULT_MODAL_COPY = {
|
|
103803
|
+
close_dialog_aria_label: "Close dialog",
|
|
103804
|
+
sign_in_heading: "Sign In",
|
|
103805
|
+
sign_in_message: "Have an account already? Please sign in.",
|
|
103806
|
+
sign_in_cta_label: "Sign In",
|
|
103807
|
+
sign_up_heading: "Sign Up",
|
|
103808
|
+
sign_up_message: "New user? Please Sign up to continue",
|
|
103809
|
+
sign_up_cta_label: "Create Account",
|
|
103810
|
+
sign_up_cta_aria_label: "Create Account",
|
|
103811
|
+
profile_heading: "Profile",
|
|
103812
|
+
profile_view_all_label: "View All",
|
|
103813
|
+
quick_links_heading: "Quick Links",
|
|
103814
|
+
wallet_heading: "Wallet",
|
|
103815
|
+
credit_label: "Credit",
|
|
103816
|
+
promos_label: "Promos",
|
|
103817
|
+
sign_out_label: "Sign Out",
|
|
103818
|
+
view_account_label: "View Account",
|
|
103819
|
+
copy_id_label: "Copy ID",
|
|
103820
|
+
copied_id_label: "Copied!"
|
|
103821
|
+
};
|
|
103822
|
+
function useSignUpSignIn(_ref) {
|
|
103823
|
+
var _ref$show = _ref.show,
|
|
103824
|
+
show = _ref$show === void 0 ? true : _ref$show,
|
|
103825
|
+
_ref$icon = _ref.icon,
|
|
103826
|
+
icon = _ref$icon === void 0 ? DEFAULT_ICON : _ref$icon,
|
|
103827
|
+
icon_color = _ref.icon_color,
|
|
103828
|
+
_ref$sign_up = _ref.sign_up,
|
|
103829
|
+
sign_up = _ref$sign_up === void 0 ? DEFAULT_SIGN_UP : _ref$sign_up,
|
|
103830
|
+
_ref$sign_in = _ref.sign_in,
|
|
103831
|
+
sign_in = _ref$sign_in === void 0 ? DEFAULT_SIGN_IN : _ref$sign_in,
|
|
103832
|
+
_ref$signed_in = _ref.signed_in,
|
|
103833
|
+
signed_in = _ref$signed_in === void 0 ? undefined : _ref$signed_in,
|
|
103834
|
+
_ref$profile_utility_ = _ref.profile_utility_links,
|
|
103835
|
+
profile_utility_links = _ref$profile_utility_ === void 0 ? undefined : _ref$profile_utility_,
|
|
103836
|
+
_ref$modal_copy = _ref.modal_copy,
|
|
103837
|
+
modal_copy = _ref$modal_copy === void 0 ? DEFAULT_MODAL_COPY : _ref$modal_copy,
|
|
103838
|
+
_ref$authService = _ref.authService,
|
|
103839
|
+
authService = _ref$authService === void 0 ? undefined : _ref$authService,
|
|
103840
|
+
_ref$customerData = _ref.customerData,
|
|
103841
|
+
customerData = _ref$customerData === void 0 ? undefined : _ref$customerData;
|
|
103842
|
+
var isMobile = useIsMobileViewport();
|
|
103843
|
+
var _useState = (0,external_react_.useState)(false),
|
|
103844
|
+
_useState2 = useSignUpSignIn_slicedToArray(_useState, 2),
|
|
103845
|
+
isModalOpen = _useState2[0],
|
|
103846
|
+
setIsModalOpen = _useState2[1];
|
|
103847
|
+
var _useState3 = (0,external_react_.useState)(false),
|
|
103848
|
+
_useState4 = useSignUpSignIn_slicedToArray(_useState3, 2),
|
|
103849
|
+
copiedAccountId = _useState4[0],
|
|
103850
|
+
setCopiedAccountId = _useState4[1];
|
|
103851
|
+
var _useAccountMenuState = useAccountMenuState(),
|
|
103852
|
+
isAccountMenuOpen = _useAccountMenuState.isAccountMenuOpen,
|
|
103853
|
+
setIsAccountMenuOpen = _useAccountMenuState.setIsAccountMenuOpen,
|
|
103854
|
+
menuRef = _useAccountMenuState.menuRef;
|
|
103855
|
+
var resolvedLinks = useResolvedAuthLinks(sign_up, sign_in, signed_in, authService);
|
|
103856
|
+
var editing = isEditingMode();
|
|
103857
|
+
var copy = useSignUpSignIn_objectSpread(useSignUpSignIn_objectSpread({}, DEFAULT_MODAL_COPY), modal_copy);
|
|
103858
|
+
var authDisplay = getAuthDisplayState({
|
|
103859
|
+
resolvedLinks: resolvedLinks,
|
|
103860
|
+
sign_up: sign_up,
|
|
103861
|
+
sign_in: sign_in,
|
|
103862
|
+
signed_in: signed_in,
|
|
103863
|
+
customerData: customerData
|
|
103864
|
+
});
|
|
103865
|
+
var profileSummary = getCustomerProfileSummary(customerData);
|
|
103866
|
+
var profileUtilityLinks = resolveProfileUtilityLinks(profile_utility_links);
|
|
103867
|
+
var firstName = getCustomerFirstName(customerData);
|
|
103868
|
+
var accountType = getCustomerAccountType(customerData);
|
|
103869
|
+
var isBrandAffiliate = isBrandAffiliateCustomer(customerData);
|
|
103870
|
+
var customerPhotoUrl = getCustomerPhotoUrl(customerData);
|
|
103871
|
+
var photoUrl = customerPhotoUrl || DEFAULT_PROFILE_PHOTO;
|
|
103872
|
+
var greetingName = formatProfileGreetingName(firstName || profileSummary.displayName || authDisplay.accountTitle);
|
|
103873
|
+
var walletSummary = getProfileWalletSummary(customerData);
|
|
103874
|
+
var volumeStats = getProfileVolumeStats(customerData);
|
|
103875
|
+
var visibleQuickLinkGroups = profileUtilityLinks.quickLinkGroups.filter(function (group) {
|
|
103876
|
+
return !group.affiliateOnly || isBrandAffiliate;
|
|
103877
|
+
});
|
|
103878
|
+
var _getIconPresentation = getIconPresentation(icon, icon_color),
|
|
103879
|
+
resolvedIconName = _getIconPresentation.resolvedIconName,
|
|
103880
|
+
resolvedIconColor = _getIconPresentation.resolvedIconColor;
|
|
103881
|
+
var closeModal = function closeModal() {
|
|
103882
|
+
return setIsModalOpen(false);
|
|
103883
|
+
};
|
|
103884
|
+
var closeAccountMenu = function closeAccountMenu() {
|
|
103885
|
+
return setIsAccountMenuOpen(false);
|
|
103886
|
+
};
|
|
103887
|
+
var dismissMenus = function dismissMenus() {
|
|
103888
|
+
closeAccountMenu();
|
|
103889
|
+
closeModal();
|
|
103890
|
+
};
|
|
103891
|
+
var showMobileModal = isMobile && (authDisplay.showGuestAuth ? isModalOpen : isAccountMenuOpen);
|
|
103892
|
+
useEscapeToCloseModal(isModalOpen, setIsModalOpen);
|
|
103893
|
+
var handleAuthenticatedAccountClick = function handleAuthenticatedAccountClick() {
|
|
103894
|
+
if (editing) return;
|
|
103895
|
+
setIsAccountMenuOpen(function (open) {
|
|
103896
|
+
return !open;
|
|
103897
|
+
});
|
|
103898
|
+
};
|
|
103899
|
+
var handleCopyAccountId = /*#__PURE__*/function () {
|
|
103900
|
+
var _ref2 = useSignUpSignIn_asyncToGenerator(/*#__PURE__*/useSignUpSignIn_regenerator().m(function _callee() {
|
|
103901
|
+
var _globalThis$navigator, _globalThis$navigator2, _globalThis$setTimeou, _t;
|
|
103902
|
+
return useSignUpSignIn_regenerator().w(function (_context) {
|
|
103903
|
+
while (1) switch (_context.p = _context.n) {
|
|
103904
|
+
case 0:
|
|
103905
|
+
if (profileSummary.accountId) {
|
|
103906
|
+
_context.n = 1;
|
|
103907
|
+
break;
|
|
103908
|
+
}
|
|
103909
|
+
return _context.a(2);
|
|
103910
|
+
case 1:
|
|
103911
|
+
_context.p = 1;
|
|
103912
|
+
_context.n = 2;
|
|
103913
|
+
return (_globalThis$navigator = globalThis.navigator) === null || _globalThis$navigator === void 0 || (_globalThis$navigator = _globalThis$navigator.clipboard) === null || _globalThis$navigator === void 0 || (_globalThis$navigator2 = _globalThis$navigator.writeText) === null || _globalThis$navigator2 === void 0 ? void 0 : _globalThis$navigator2.call(_globalThis$navigator, profileSummary.accountId);
|
|
103914
|
+
case 2:
|
|
103915
|
+
setCopiedAccountId(true);
|
|
103916
|
+
(_globalThis$setTimeou = globalThis.setTimeout) === null || _globalThis$setTimeou === void 0 || _globalThis$setTimeou.call(globalThis, function () {
|
|
103917
|
+
return setCopiedAccountId(false);
|
|
103918
|
+
}, 2000);
|
|
103919
|
+
_context.n = 4;
|
|
103920
|
+
break;
|
|
103921
|
+
case 3:
|
|
103922
|
+
_context.p = 3;
|
|
103923
|
+
_t = _context.v;
|
|
103924
|
+
setCopiedAccountId(false);
|
|
103925
|
+
case 4:
|
|
103926
|
+
return _context.a(2);
|
|
103927
|
+
}
|
|
103928
|
+
}, _callee, null, [[1, 3]]);
|
|
103929
|
+
}));
|
|
103930
|
+
return function handleCopyAccountId() {
|
|
103931
|
+
return _ref2.apply(this, arguments);
|
|
103932
|
+
};
|
|
103933
|
+
}();
|
|
103934
|
+
var profilePanelProps = {
|
|
103935
|
+
copy: copy,
|
|
103936
|
+
editing: editing,
|
|
103937
|
+
authService: authService,
|
|
103938
|
+
accountUrl: authDisplay.accountUrl,
|
|
103939
|
+
profileSummary: profileSummary,
|
|
103940
|
+
greetingName: greetingName,
|
|
103941
|
+
customerPhotoUrl: customerPhotoUrl,
|
|
103942
|
+
photoUrl: photoUrl,
|
|
103943
|
+
resolvedIconName: resolvedIconName,
|
|
103944
|
+
resolvedIconColor: resolvedIconColor,
|
|
103945
|
+
accountType: accountType,
|
|
103946
|
+
isBrandAffiliate: isBrandAffiliate,
|
|
103947
|
+
volumeStats: volumeStats,
|
|
103948
|
+
walletSummary: walletSummary,
|
|
103949
|
+
walletUrl: profileUtilityLinks.walletUrl,
|
|
103950
|
+
visibleQuickLinkGroups: visibleQuickLinkGroups,
|
|
103951
|
+
copiedAccountId: copiedAccountId,
|
|
103952
|
+
onCopyAccountId: handleCopyAccountId,
|
|
103953
|
+
onDismiss: dismissMenus
|
|
103954
|
+
};
|
|
103955
|
+
return {
|
|
103956
|
+
show: show,
|
|
103957
|
+
isMobile: isMobile,
|
|
103958
|
+
editing: editing,
|
|
103959
|
+
copy: copy,
|
|
103960
|
+
authService: authService,
|
|
103961
|
+
authDisplay: authDisplay,
|
|
103962
|
+
menuRef: menuRef,
|
|
103963
|
+
isAccountMenuOpen: isAccountMenuOpen,
|
|
103964
|
+
setIsModalOpen: setIsModalOpen,
|
|
103965
|
+
closeModal: closeModal,
|
|
103966
|
+
dismissMenus: dismissMenus,
|
|
103967
|
+
showMobileModal: showMobileModal,
|
|
103968
|
+
greetingName: greetingName,
|
|
103969
|
+
resolvedIconName: resolvedIconName,
|
|
103970
|
+
resolvedIconColor: resolvedIconColor,
|
|
103971
|
+
profilePanelProps: profilePanelProps,
|
|
103972
|
+
handleAuthenticatedAccountClick: handleAuthenticatedAccountClick
|
|
103973
|
+
};
|
|
103974
|
+
}
|
|
103975
|
+
;// ./src/components/signup-signin/SignUpSignIn.styled.jsx
|
|
103341
103976
|
|
|
103342
|
-
function
|
|
103977
|
+
function SignUpSignIn_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)."; }
|
|
103343
103978
|
var MOBILE_MAX_WIDTH_PX = 1024;
|
|
103344
|
-
var
|
|
103345
|
-
target: "
|
|
103979
|
+
var SignUpSignInRoot = /*#__PURE__*/createStyled("div", true ? {
|
|
103980
|
+
target: "ea5wen561"
|
|
103346
103981
|
} : 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));
|
|
103347
103982
|
var SignTextLink = /*#__PURE__*/createStyled("span", true ? {
|
|
103348
|
-
target: "
|
|
103983
|
+
target: "ea5wen560"
|
|
103349
103984
|
} : 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));
|
|
103350
103985
|
var SignUpLink = /*#__PURE__*/createStyled("button", true ? {
|
|
103351
|
-
target: "
|
|
103986
|
+
target: "ea5wen559"
|
|
103352
103987
|
} : 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));
|
|
103353
103988
|
var SignInLink = /*#__PURE__*/createStyled("button", true ? {
|
|
103354
|
-
target: "
|
|
103989
|
+
target: "ea5wen558"
|
|
103355
103990
|
} : 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));
|
|
103356
103991
|
var Divider = /*#__PURE__*/createStyled("span", true ? {
|
|
103357
|
-
target: "
|
|
103992
|
+
target: "ea5wen557"
|
|
103358
103993
|
} : 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));
|
|
103359
103994
|
var IconWrap = /*#__PURE__*/createStyled("span", true ? {
|
|
103360
|
-
target: "
|
|
103995
|
+
target: "ea5wen556"
|
|
103361
103996
|
} : 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));
|
|
103362
103997
|
var MobileAuthModalBackdrop = /*#__PURE__*/createStyled("div", true ? {
|
|
103363
|
-
target: "
|
|
103998
|
+
target: "ea5wen555"
|
|
103364
103999
|
} : 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));
|
|
103365
104000
|
var MobileAuthModal = /*#__PURE__*/createStyled("dialog", true ? {
|
|
103366
|
-
target: "
|
|
104001
|
+
target: "ea5wen554"
|
|
103367
104002
|
} : 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));
|
|
103368
104003
|
var ModalHeaderRow = /*#__PURE__*/createStyled("div", true ? {
|
|
103369
|
-
target: "
|
|
104004
|
+
target: "ea5wen553"
|
|
103370
104005
|
} : 0)( true ? {
|
|
103371
104006
|
name: "wbibpl",
|
|
103372
104007
|
styles: "display:flex;align-items:flex-start;justify-content:flex-end;width:100%;min-height:44px;padding:12px 18px 0;box-sizing:border-box"
|
|
103373
104008
|
} : 0);
|
|
103374
104009
|
var ModalTitle = /*#__PURE__*/createStyled("h2", true ? {
|
|
103375
|
-
target: "
|
|
104010
|
+
target: "ea5wen552"
|
|
103376
104011
|
} : 0)( true ? {
|
|
103377
104012
|
name: "1m9bk8n",
|
|
103378
104013
|
styles: "margin:0;color:#252525;font-family:var(--signin-font);font-size:22px;line-height:28px;font-weight:400"
|
|
103379
104014
|
} : 0);
|
|
103380
104015
|
var ModalCancelButton = /*#__PURE__*/createStyled("button", true ? {
|
|
103381
|
-
target: "
|
|
104016
|
+
target: "ea5wen551"
|
|
103382
104017
|
} : 0)( true ? {
|
|
103383
104018
|
name: "u33vv4",
|
|
103384
104019
|
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;}"
|
|
103385
104020
|
} : 0);
|
|
103386
104021
|
var ModalContent = /*#__PURE__*/createStyled("div", true ? {
|
|
103387
|
-
target: "
|
|
104022
|
+
target: "ea5wen550"
|
|
103388
104023
|
} : 0)( true ? {
|
|
103389
104024
|
name: "150yav4",
|
|
103390
104025
|
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;}"
|
|
103391
104026
|
} : 0);
|
|
103392
104027
|
var ModalSections = /*#__PURE__*/createStyled("div", true ? {
|
|
103393
|
-
target: "
|
|
104028
|
+
target: "ea5wen549"
|
|
103394
104029
|
} : 0)( true ? {
|
|
103395
104030
|
name: "dbqp8z",
|
|
103396
104031
|
styles: "display:flex;flex-direction:column;width:100%;gap:0;box-sizing:border-box"
|
|
103397
104032
|
} : 0);
|
|
103398
104033
|
var ModalSection = /*#__PURE__*/createStyled("section", true ? {
|
|
103399
|
-
target: "
|
|
104034
|
+
target: "ea5wen548"
|
|
103400
104035
|
} : 0)( true ? {
|
|
103401
104036
|
name: "phcu5u",
|
|
103402
104037
|
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;}}"
|
|
103403
104038
|
} : 0);
|
|
103404
104039
|
var SectionTitle = /*#__PURE__*/createStyled("h3", true ? {
|
|
103405
|
-
target: "
|
|
104040
|
+
target: "ea5wen547"
|
|
103406
104041
|
} : 0)( true ? {
|
|
103407
104042
|
name: "1kyoijh",
|
|
103408
104043
|
styles: "margin:0;color:#252525;font-family:var(--signin-font);font-size:18px;line-height:22px;font-weight:600;text-transform:uppercase"
|
|
103409
104044
|
} : 0);
|
|
103410
104045
|
var SectionMessage = /*#__PURE__*/createStyled("p", true ? {
|
|
103411
|
-
target: "
|
|
104046
|
+
target: "ea5wen546"
|
|
103412
104047
|
} : 0)( true ? {
|
|
103413
104048
|
name: "18ee69d",
|
|
103414
104049
|
styles: "margin:0;color:#000000de;font-family:var(--signin-font);font-size:16px;line-height:22px;font-weight:400;overflow-wrap:anywhere"
|
|
103415
104050
|
} : 0);
|
|
103416
104051
|
var PrimaryButton = /*#__PURE__*/createStyled("button", true ? {
|
|
103417
|
-
target: "
|
|
104052
|
+
target: "ea5wen545"
|
|
103418
104053
|
} : 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));
|
|
104054
|
+
var AccountMenuRoot = /*#__PURE__*/createStyled("div", true ? {
|
|
104055
|
+
target: "ea5wen544"
|
|
104056
|
+
} : 0)( true ? {
|
|
104057
|
+
name: "b9hrb",
|
|
104058
|
+
styles: "position:relative;display:inline-flex;align-items:center"
|
|
104059
|
+
} : 0);
|
|
104060
|
+
var AccountToggle = /*#__PURE__*/createStyled("button", true ? {
|
|
104061
|
+
target: "ea5wen543"
|
|
104062
|
+
} : 0)( true ? {
|
|
104063
|
+
name: "1bylzkq",
|
|
104064
|
+
styles: "&&{display:inline-flex;align-items:center;gap:4px;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;color:var(--signin-text);padding:1px 4px;cursor:pointer;white-space:nowrap;}&:focus-visible{outline:1px solid var(--signin-focus);outline-offset:1px;}"
|
|
104065
|
+
} : 0);
|
|
104066
|
+
var AccountIconWrap = /*#__PURE__*/createStyled("span", true ? {
|
|
104067
|
+
target: "ea5wen542"
|
|
104068
|
+
} : 0)( true ? {
|
|
104069
|
+
name: "1n64mix",
|
|
104070
|
+
styles: "display:inline-flex;align-items:center;justify-content:center;line-height:0;font-size:0"
|
|
104071
|
+
} : 0);
|
|
104072
|
+
var AccountDropdownPanel = /*#__PURE__*/createStyled("div", true ? {
|
|
104073
|
+
target: "ea5wen541"
|
|
104074
|
+
} : 0)( true ? {
|
|
104075
|
+
name: "hkpo46",
|
|
104076
|
+
styles: "position:absolute;top:calc(100% + 8px);right:0;z-index:1300;min-width:290px;max-width:320px;background:#ffffff;border:1px solid #e5e5e5;border-radius:8px;box-shadow:0 8px 24px rgba(0, 0, 0, 0.12);padding:0 0 12px;display:flex;flex-direction:column;gap:4px"
|
|
104077
|
+
} : 0);
|
|
104078
|
+
var ProfilePanelHeader = /*#__PURE__*/createStyled("div", true ? {
|
|
104079
|
+
target: "ea5wen540"
|
|
104080
|
+
} : 0)( true ? {
|
|
104081
|
+
name: "13fbptl",
|
|
104082
|
+
styles: "display:flex;align-items:center;justify-content:space-between;padding:12px 12px 0"
|
|
104083
|
+
} : 0);
|
|
104084
|
+
var ProfilePanelHeading = /*#__PURE__*/createStyled("p", true ? {
|
|
104085
|
+
target: "ea5wen539"
|
|
104086
|
+
} : 0)( true ? {
|
|
104087
|
+
name: "1jpp97e",
|
|
104088
|
+
styles: "margin:0;font-family:var(--signin-font);font-size:14px;font-weight:600;color:#252525"
|
|
104089
|
+
} : 0);
|
|
104090
|
+
var ProfileViewAllButton = /*#__PURE__*/createStyled("button", true ? {
|
|
104091
|
+
target: "ea5wen538"
|
|
104092
|
+
} : 0)( true ? {
|
|
104093
|
+
name: "136adtz",
|
|
104094
|
+
styles: "appearance:none;border:0;background:transparent;padding:0;font-family:var(--signin-font);font-size:14px;font-weight:400;color:#3783b9;cursor:pointer;display:inline-flex;align-items:center;gap:4px;&:focus-visible{outline:1px solid var(--signin-focus);outline-offset:1px;}"
|
|
104095
|
+
} : 0);
|
|
104096
|
+
var ProfileIdentityBlock = /*#__PURE__*/createStyled("div", true ? {
|
|
104097
|
+
target: "ea5wen537"
|
|
104098
|
+
} : 0)( true ? {
|
|
104099
|
+
name: "hqp3yf",
|
|
104100
|
+
styles: "display:flex;flex-direction:column;align-items:center;gap:8px;padding:0 12px 8px"
|
|
104101
|
+
} : 0);
|
|
104102
|
+
var ProfileAvatar = /*#__PURE__*/createStyled("img", true ? {
|
|
104103
|
+
target: "ea5wen536"
|
|
104104
|
+
} : 0)( true ? {
|
|
104105
|
+
name: "1kycpr4",
|
|
104106
|
+
styles: "width:64px;height:64px;border-radius:50%;object-fit:cover"
|
|
104107
|
+
} : 0);
|
|
104108
|
+
var ProfileAvatarFallback = /*#__PURE__*/createStyled("span", true ? {
|
|
104109
|
+
target: "ea5wen535"
|
|
104110
|
+
} : 0)( true ? {
|
|
104111
|
+
name: "eblg80",
|
|
104112
|
+
styles: "display:inline-flex;align-items:center;justify-content:center;width:64px;height:64px;border-radius:50%;background:#f3f3f3;color:#5f5f5f"
|
|
104113
|
+
} : 0);
|
|
104114
|
+
var ProfileGreeting = /*#__PURE__*/createStyled("p", true ? {
|
|
104115
|
+
target: "ea5wen534"
|
|
104116
|
+
} : 0)( true ? {
|
|
104117
|
+
name: "1jpp97e",
|
|
104118
|
+
styles: "margin:0;font-family:var(--signin-font);font-size:14px;font-weight:600;color:#252525"
|
|
104119
|
+
} : 0);
|
|
104120
|
+
var ProfileAccountType = /*#__PURE__*/createStyled("p", true ? {
|
|
104121
|
+
target: "ea5wen533"
|
|
104122
|
+
} : 0)( true ? {
|
|
104123
|
+
name: "tl5djb",
|
|
104124
|
+
styles: "margin:0;font-family:var(--signin-font);font-size:14px;font-weight:400;color:#252525"
|
|
104125
|
+
} : 0);
|
|
104126
|
+
var ProfileAffiliateBadgeRow = /*#__PURE__*/createStyled("div", true ? {
|
|
104127
|
+
target: "ea5wen532"
|
|
104128
|
+
} : 0)( true ? {
|
|
104129
|
+
name: "76x507",
|
|
104130
|
+
styles: "display:inline-flex;align-items:center;gap:6px"
|
|
104131
|
+
} : 0);
|
|
104132
|
+
var ProfileAffiliateBadgeIcon = /*#__PURE__*/createStyled("span", true ? {
|
|
104133
|
+
target: "ea5wen531"
|
|
104134
|
+
} : 0)( true ? {
|
|
104135
|
+
name: "pa6lz1",
|
|
104136
|
+
styles: "display:inline-flex;align-items:center;justify-content:center;width:20px;height:20px;border-radius:50%;background:#e87722;color:#ffffff;font-size:10px;font-weight:700;line-height:1"
|
|
104137
|
+
} : 0);
|
|
104138
|
+
var ProfileAffiliateBadgeText = /*#__PURE__*/createStyled("span", true ? {
|
|
104139
|
+
target: "ea5wen530"
|
|
104140
|
+
} : 0)( true ? {
|
|
104141
|
+
name: "15fgwg2",
|
|
104142
|
+
styles: "font-family:var(--signin-font);font-size:12px;font-weight:400;color:#252525"
|
|
104143
|
+
} : 0);
|
|
104144
|
+
var ProfileVolumeStatsRow = /*#__PURE__*/createStyled("div", true ? {
|
|
104145
|
+
target: "ea5wen529"
|
|
104146
|
+
} : 0)( true ? {
|
|
104147
|
+
name: "1asjdsl",
|
|
104148
|
+
styles: "display:flex;align-items:center;justify-content:center;gap:16px;width:100%"
|
|
104149
|
+
} : 0);
|
|
104150
|
+
var ProfileVolumeStat = /*#__PURE__*/createStyled("div", true ? {
|
|
104151
|
+
target: "ea5wen528"
|
|
104152
|
+
} : 0)( true ? {
|
|
104153
|
+
name: "1tkope6",
|
|
104154
|
+
styles: "display:inline-flex;align-items:center;gap:4px"
|
|
104155
|
+
} : 0);
|
|
104156
|
+
var ProfileVolumeBadge = /*#__PURE__*/createStyled("span", true ? {
|
|
104157
|
+
target: "ea5wen527"
|
|
104158
|
+
} : 0)( true ? {
|
|
104159
|
+
name: "67bryj",
|
|
104160
|
+
styles: "display:inline-flex;align-items:center;justify-content:center;min-width:36px;padding:2px 6px;border-radius:2px;background:#252525;color:#ffffff;font-family:var(--signin-font);font-size:12px;font-weight:600;line-height:16px"
|
|
104161
|
+
} : 0);
|
|
104162
|
+
var ProfileVolumeLabel = /*#__PURE__*/createStyled("span", true ? {
|
|
104163
|
+
target: "ea5wen526"
|
|
104164
|
+
} : 0)( true ? {
|
|
104165
|
+
name: "1h9lxx7",
|
|
104166
|
+
styles: "font-family:var(--signin-font);font-size:10px;font-weight:400;color:#5f5f5f"
|
|
104167
|
+
} : 0);
|
|
104168
|
+
var ProfileWalletSection = /*#__PURE__*/createStyled("div", true ? {
|
|
104169
|
+
target: "ea5wen525"
|
|
104170
|
+
} : 0)( true ? {
|
|
104171
|
+
name: "dba0hq",
|
|
104172
|
+
styles: "padding:8px 12px"
|
|
104173
|
+
} : 0);
|
|
104174
|
+
var ProfileWalletHeader = /*#__PURE__*/createStyled("button", true ? {
|
|
104175
|
+
target: "ea5wen524"
|
|
104176
|
+
} : 0)( true ? {
|
|
104177
|
+
name: "uls0u3",
|
|
104178
|
+
styles: "appearance:none;border:0;background:transparent;padding:0;margin:0 0 8px;width:100%;display:inline-flex;align-items:center;gap:4px;font-family:var(--signin-font);font-size:14px;font-weight:600;color:#252525;cursor:pointer;text-align:left;&:focus-visible{outline:1px solid var(--signin-focus);outline-offset:1px;}"
|
|
104179
|
+
} : 0);
|
|
104180
|
+
var ProfileWalletCards = /*#__PURE__*/createStyled("div", true ? {
|
|
104181
|
+
target: "ea5wen523"
|
|
104182
|
+
} : 0)( true ? {
|
|
104183
|
+
name: "11jf4ye",
|
|
104184
|
+
styles: "display:flex;gap:8px"
|
|
104185
|
+
} : 0);
|
|
104186
|
+
var ProfileWalletCard = /*#__PURE__*/createStyled("div", true ? {
|
|
104187
|
+
target: "ea5wen522"
|
|
104188
|
+
} : 0)( true ? {
|
|
104189
|
+
name: "1n1fgd8",
|
|
104190
|
+
styles: "flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;padding:10px 8px;border-radius:8px;background:#f3f3f3"
|
|
104191
|
+
} : 0);
|
|
104192
|
+
var ProfileWalletValue = /*#__PURE__*/createStyled("span", true ? {
|
|
104193
|
+
target: "ea5wen521"
|
|
104194
|
+
} : 0)( true ? {
|
|
104195
|
+
name: "cvi7is",
|
|
104196
|
+
styles: "font-family:var(--signin-font);font-size:16px;font-weight:600;color:#252525;line-height:1.2"
|
|
104197
|
+
} : 0);
|
|
104198
|
+
var ProfileWalletLabel = /*#__PURE__*/createStyled("span", true ? {
|
|
104199
|
+
target: "ea5wen520"
|
|
104200
|
+
} : 0)( true ? {
|
|
104201
|
+
name: "1h9lxx7",
|
|
104202
|
+
styles: "font-family:var(--signin-font);font-size:10px;font-weight:400;color:#5f5f5f"
|
|
104203
|
+
} : 0);
|
|
104204
|
+
var ProfileQuickLinksSection = /*#__PURE__*/createStyled("div", true ? {
|
|
104205
|
+
target: "ea5wen519"
|
|
104206
|
+
} : 0)( true ? {
|
|
104207
|
+
name: "nzethj",
|
|
104208
|
+
styles: "padding:4px 12px 0"
|
|
104209
|
+
} : 0);
|
|
104210
|
+
var ProfileQuickLinksTitle = /*#__PURE__*/createStyled("p", true ? {
|
|
104211
|
+
target: "ea5wen518"
|
|
104212
|
+
} : 0)( true ? {
|
|
104213
|
+
name: "1ef5jph",
|
|
104214
|
+
styles: "margin:0 0 8px;font-family:var(--signin-font);font-size:14px;font-weight:600;color:#252525"
|
|
104215
|
+
} : 0);
|
|
104216
|
+
var ProfileQuickLinkGroup = /*#__PURE__*/createStyled("div", true ? {
|
|
104217
|
+
target: "ea5wen517"
|
|
104218
|
+
} : 0)( true ? {
|
|
104219
|
+
name: "5bhc30",
|
|
104220
|
+
styles: "margin-bottom:8px"
|
|
104221
|
+
} : 0);
|
|
104222
|
+
var ProfileQuickLinkGroupTitle = /*#__PURE__*/createStyled("p", true ? {
|
|
104223
|
+
target: "ea5wen516"
|
|
104224
|
+
} : 0)( true ? {
|
|
104225
|
+
name: "1ijkzem",
|
|
104226
|
+
styles: "margin:0 0 8px;padding-left:8px;font-family:var(--signin-font);font-size:14px;font-weight:600;color:#252525"
|
|
104227
|
+
} : 0);
|
|
104228
|
+
var ProfileIdRow = /*#__PURE__*/createStyled("div", true ? {
|
|
104229
|
+
target: "ea5wen515"
|
|
104230
|
+
} : 0)( true ? {
|
|
104231
|
+
name: "1tkope6",
|
|
104232
|
+
styles: "display:inline-flex;align-items:center;gap:4px"
|
|
104233
|
+
} : 0);
|
|
104234
|
+
var ProfileIdText = /*#__PURE__*/createStyled("p", true ? {
|
|
104235
|
+
target: "ea5wen514"
|
|
104236
|
+
} : 0)( true ? {
|
|
104237
|
+
name: "uoxnul",
|
|
104238
|
+
styles: "margin:0;font-family:var(--signin-font);font-size:10px;font-weight:400;color:#5f5f5f"
|
|
104239
|
+
} : 0);
|
|
104240
|
+
var ProfileCopyButton = /*#__PURE__*/createStyled("button", true ? {
|
|
104241
|
+
target: "ea5wen513"
|
|
104242
|
+
} : 0)( true ? {
|
|
104243
|
+
name: "1gpr2pr",
|
|
104244
|
+
styles: "appearance:none;border:0;background:transparent;padding:0;display:inline-flex;align-items:center;justify-content:center;color:#b2b2b2;cursor:pointer;line-height:0;&:focus-visible{outline:1px solid var(--signin-focus);outline-offset:1px;}"
|
|
104245
|
+
} : 0);
|
|
104246
|
+
var ProfileLinkSection = /*#__PURE__*/createStyled("div", true ? {
|
|
104247
|
+
target: "ea5wen512"
|
|
104248
|
+
} : 0)( true ? {
|
|
104249
|
+
name: "qn06vg",
|
|
104250
|
+
styles: "padding:4px 12px"
|
|
104251
|
+
} : 0);
|
|
104252
|
+
var ProfileLinkSectionTitle = /*#__PURE__*/createStyled("p", true ? {
|
|
104253
|
+
target: "ea5wen511"
|
|
104254
|
+
} : 0)( true ? {
|
|
104255
|
+
name: "1cublp4",
|
|
104256
|
+
styles: "margin:0 0 12px;font-family:var(--signin-font);font-size:14px;font-weight:600;color:#252525"
|
|
104257
|
+
} : 0);
|
|
104258
|
+
var ProfileLinkList = /*#__PURE__*/createStyled("div", true ? {
|
|
104259
|
+
target: "ea5wen510"
|
|
104260
|
+
} : 0)( true ? {
|
|
104261
|
+
name: "1nhzvu0",
|
|
104262
|
+
styles: "display:flex;flex-direction:column;gap:8px;padding-left:8px"
|
|
104263
|
+
} : 0);
|
|
104264
|
+
var ProfileUtilityLink = /*#__PURE__*/createStyled("button", true ? {
|
|
104265
|
+
target: "ea5wen59"
|
|
104266
|
+
} : 0)( true ? {
|
|
104267
|
+
name: "19r2xhx",
|
|
104268
|
+
styles: "appearance:none;border:0;background:transparent;padding:0;text-align:left;font-family:var(--signin-font);font-size:14px;font-weight:400;line-height:20px;color:#5f5f5f;cursor:pointer;display:inline-flex;align-items:center;gap:4px;&:hover,&:focus-visible{color:#252525;text-decoration:underline;}&:focus-visible{outline:1px solid var(--signin-focus);outline-offset:1px;}"
|
|
104269
|
+
} : 0);
|
|
104270
|
+
var ProfileLinkExternalIcon = /*#__PURE__*/createStyled("span", true ? {
|
|
104271
|
+
target: "ea5wen58"
|
|
104272
|
+
} : 0)( true ? {
|
|
104273
|
+
name: "tumm0h",
|
|
104274
|
+
styles: "display:inline-flex;align-items:center;justify-content:center;color:#5f5f5f;line-height:0"
|
|
104275
|
+
} : 0);
|
|
104276
|
+
var ProfileSignOutButton = /*#__PURE__*/createStyled("button", true ? {
|
|
104277
|
+
target: "ea5wen57"
|
|
104278
|
+
} : 0)( true ? {
|
|
104279
|
+
name: "vqcag5",
|
|
104280
|
+
styles: "appearance:none;margin:0 12px;padding:8px;border:1px solid #b2b2b2;border-radius:4px;background:#ffffff;color:#252525;font-family:var(--signin-font);font-size:14px;font-weight:600;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;gap:8px;&:focus-visible{outline:1px solid var(--signin-focus);outline-offset:1px;}"
|
|
104281
|
+
} : 0);
|
|
104282
|
+
var AccountUserName = /*#__PURE__*/createStyled("span", true ? {
|
|
104283
|
+
target: "ea5wen56"
|
|
104284
|
+
} : 0)("cursor:pointer;text-underline-offset:2px;", AccountToggle, ":hover &,", AccountToggle, ":focus-visible &{text-decoration:underline;}" + ( true ? "" : 0));
|
|
104285
|
+
var AccountProfileBlock = /*#__PURE__*/createStyled("div", true ? {
|
|
104286
|
+
target: "ea5wen55"
|
|
104287
|
+
} : 0)( true ? {
|
|
104288
|
+
name: "urqszi",
|
|
104289
|
+
styles: "display:flex;flex-direction:column;gap:4px"
|
|
104290
|
+
} : 0);
|
|
104291
|
+
var AccountProfileTitle = /*#__PURE__*/createStyled("p", true ? {
|
|
104292
|
+
target: "ea5wen54"
|
|
104293
|
+
} : 0)( true ? {
|
|
104294
|
+
name: "1i1k95m",
|
|
104295
|
+
styles: "margin:0;font-family:var(--signin-font);font-size:16px;font-weight:600;color:#252525"
|
|
104296
|
+
} : 0);
|
|
104297
|
+
var AccountProfileMeta = /*#__PURE__*/createStyled("p", true ? {
|
|
104298
|
+
target: "ea5wen53"
|
|
104299
|
+
} : 0)( true ? {
|
|
104300
|
+
name: "290cob",
|
|
104301
|
+
styles: "margin:0;font-family:var(--signin-font);font-size:13px;line-height:18px;color:#5f5f5f;overflow-wrap:anywhere"
|
|
104302
|
+
} : 0);
|
|
104303
|
+
var AccountMenuAction = /*#__PURE__*/createStyled("button", true ? {
|
|
104304
|
+
target: "ea5wen52"
|
|
104305
|
+
} : 0)( true ? {
|
|
104306
|
+
name: "ia7rwo",
|
|
104307
|
+
styles: "width:100%;min-height:40px;border-radius:4px;border:0;background:#252525;color:#ffffff;font-family:var(--signin-font);font-size:14px;font-weight:600;cursor:pointer;&:focus-visible{outline:1px solid var(--signin-focus);outline-offset:1px;}"
|
|
104308
|
+
} : 0);
|
|
104309
|
+
var AccountSignOutButton = /*#__PURE__*/createStyled(AccountMenuAction, true ? {
|
|
104310
|
+
target: "ea5wen51"
|
|
104311
|
+
} : 0)( true ? {
|
|
104312
|
+
name: "1uk495g",
|
|
104313
|
+
styles: "background:#ffffff;color:#252525;border:1px solid #252525"
|
|
104314
|
+
} : 0);
|
|
103419
104315
|
var OutlinedButton = /*#__PURE__*/createStyled("button", true ? {
|
|
103420
|
-
target: "
|
|
104316
|
+
target: "ea5wen50"
|
|
103421
104317
|
} : 0)( true ? {
|
|
103422
104318
|
name: "16bjh6l",
|
|
103423
104319
|
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;}"
|
|
103424
104320
|
} : 0);
|
|
103425
|
-
;// ./src/components/signup-signin/
|
|
103426
|
-
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); }
|
|
103427
|
-
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; }
|
|
103428
|
-
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; }
|
|
103429
|
-
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; }
|
|
103430
|
-
function SignUpOrSignIn_toPropertyKey(t) { var i = SignUpOrSignIn_toPrimitive(t, "string"); return "symbol" == SignUpOrSignIn_typeof(i) ? i : i + ""; }
|
|
103431
|
-
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); }
|
|
103432
|
-
function SignUpOrSignIn_slicedToArray(r, e) { return SignUpOrSignIn_arrayWithHoles(r) || SignUpOrSignIn_iterableToArrayLimit(r, e) || SignUpOrSignIn_unsupportedIterableToArray(r, e) || SignUpOrSignIn_nonIterableRest(); }
|
|
103433
|
-
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."); }
|
|
103434
|
-
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; } }
|
|
103435
|
-
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; }
|
|
103436
|
-
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; } }
|
|
103437
|
-
function SignUpOrSignIn_arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
|
104321
|
+
;// ./src/components/signup-signin/SignUpSignInProfilePanel.jsx
|
|
103438
104322
|
|
|
103439
104323
|
|
|
103440
104324
|
|
|
103441
104325
|
|
|
103442
104326
|
|
|
103443
104327
|
|
|
103444
|
-
|
|
103445
|
-
|
|
103446
|
-
|
|
103447
|
-
|
|
103448
|
-
|
|
103449
|
-
|
|
103450
|
-
|
|
103451
|
-
|
|
103452
|
-
|
|
103453
|
-
|
|
103454
|
-
|
|
104328
|
+
var CopyIdIcon = function CopyIdIcon() {
|
|
104329
|
+
return /*#__PURE__*/(0,jsx_runtime_.jsx)("svg", {
|
|
104330
|
+
width: "12",
|
|
104331
|
+
height: "12",
|
|
104332
|
+
viewBox: "0 0 24 24",
|
|
104333
|
+
"aria-hidden": "true",
|
|
104334
|
+
children: /*#__PURE__*/(0,jsx_runtime_.jsx)("path", {
|
|
104335
|
+
fill: "currentColor"
|
|
104336
|
+
// eslint-disable-next-line spellcheck/spell-checker
|
|
104337
|
+
,
|
|
104338
|
+
d: "M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 18H8V7h11v16z"
|
|
104339
|
+
})
|
|
104340
|
+
});
|
|
103455
104341
|
};
|
|
103456
|
-
function
|
|
103457
|
-
|
|
103458
|
-
|
|
103459
|
-
|
|
103460
|
-
|
|
103461
|
-
|
|
103462
|
-
|
|
103463
|
-
|
|
103464
|
-
|
|
103465
|
-
|
|
103466
|
-
|
|
103467
|
-
|
|
103468
|
-
|
|
103469
|
-
|
|
103470
|
-
|
|
103471
|
-
|
|
103472
|
-
|
|
103473
|
-
|
|
103474
|
-
|
|
103475
|
-
|
|
103476
|
-
|
|
103477
|
-
|
|
103478
|
-
|
|
103479
|
-
|
|
103480
|
-
|
|
103481
|
-
|
|
103482
|
-
|
|
103483
|
-
|
|
103484
|
-
|
|
103485
|
-
|
|
103486
|
-
|
|
103487
|
-
|
|
103488
|
-
|
|
104342
|
+
var SignUpSignInProfilePanel_ArrowRightIcon = function ArrowRightIcon() {
|
|
104343
|
+
return /*#__PURE__*/(0,jsx_runtime_.jsx)("svg", {
|
|
104344
|
+
width: "14",
|
|
104345
|
+
height: "14",
|
|
104346
|
+
viewBox: "0 0 24 24",
|
|
104347
|
+
"aria-hidden": "true",
|
|
104348
|
+
children: /*#__PURE__*/(0,jsx_runtime_.jsx)("path", {
|
|
104349
|
+
fill: "currentColor",
|
|
104350
|
+
d: "M10 17l5-5-5-5v10z"
|
|
104351
|
+
})
|
|
104352
|
+
});
|
|
104353
|
+
};
|
|
104354
|
+
var ExternalLinkIcon = function ExternalLinkIcon() {
|
|
104355
|
+
return /*#__PURE__*/(0,jsx_runtime_.jsx)("svg", {
|
|
104356
|
+
width: "12",
|
|
104357
|
+
height: "12",
|
|
104358
|
+
viewBox: "0 0 24 24",
|
|
104359
|
+
"aria-hidden": "true",
|
|
104360
|
+
children: /*#__PURE__*/(0,jsx_runtime_.jsx)("path", {
|
|
104361
|
+
fill: "currentColor",
|
|
104362
|
+
d: "M19 19H5V5h7V3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7h-2v7zM14 3v2h3.59L10 12.59 11.41 14 19 6.41V10h2V3h-7z"
|
|
104363
|
+
})
|
|
104364
|
+
});
|
|
104365
|
+
};
|
|
104366
|
+
var SignOutIcon = function SignOutIcon() {
|
|
104367
|
+
return /*#__PURE__*/(0,jsx_runtime_.jsx)("svg", {
|
|
104368
|
+
width: "16",
|
|
104369
|
+
height: "16",
|
|
104370
|
+
viewBox: "0 0 24 24",
|
|
104371
|
+
"aria-hidden": "true",
|
|
104372
|
+
children: /*#__PURE__*/(0,jsx_runtime_.jsx)("path", {
|
|
104373
|
+
fill: "currentColor",
|
|
104374
|
+
d: "M17 7l-1.41 1.41L18.17 11H8v2h10.17l-2.58 2.58L17 17l5-5-5-5zM4 5h8V3H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h8v-2H4V5z"
|
|
104375
|
+
})
|
|
104376
|
+
});
|
|
104377
|
+
};
|
|
104378
|
+
function ProfileQuickLinkItem(_ref) {
|
|
104379
|
+
var link = _ref.link,
|
|
104380
|
+
editing = _ref.editing,
|
|
104381
|
+
authService = _ref.authService,
|
|
104382
|
+
onDismiss = _ref.onDismiss;
|
|
104383
|
+
var handleClick = function handleClick() {
|
|
104384
|
+
onDismiss();
|
|
104385
|
+
handleProfileLinkNavigate(editing, link.url, authService, {
|
|
104386
|
+
external: link.external
|
|
104387
|
+
});
|
|
103489
104388
|
};
|
|
103490
|
-
|
|
103491
|
-
|
|
103492
|
-
|
|
103493
|
-
|
|
103494
|
-
|
|
103495
|
-
|
|
103496
|
-
|
|
103497
|
-
|
|
103498
|
-
|
|
103499
|
-
|
|
103500
|
-
|
|
104389
|
+
return /*#__PURE__*/(0,jsx_runtime_.jsxs)(ProfileUtilityLink, {
|
|
104390
|
+
type: "button",
|
|
104391
|
+
"data-testid": "profile-link-".concat(link.label),
|
|
104392
|
+
onClick: handleClick,
|
|
104393
|
+
children: [link.label, link.external ? /*#__PURE__*/(0,jsx_runtime_.jsx)(ProfileLinkExternalIcon, {
|
|
104394
|
+
children: /*#__PURE__*/(0,jsx_runtime_.jsx)(ExternalLinkIcon, {})
|
|
104395
|
+
}) : null]
|
|
104396
|
+
});
|
|
104397
|
+
}
|
|
104398
|
+
ProfileQuickLinkItem.propTypes = {
|
|
104399
|
+
link: external_prop_types_default().shape({
|
|
104400
|
+
label: (external_prop_types_default()).string.isRequired,
|
|
104401
|
+
url: (external_prop_types_default()).string.isRequired,
|
|
104402
|
+
external: (external_prop_types_default()).bool
|
|
104403
|
+
}).isRequired,
|
|
104404
|
+
editing: (external_prop_types_default()).bool.isRequired,
|
|
104405
|
+
authService: (external_prop_types_default()).object,
|
|
104406
|
+
onDismiss: (external_prop_types_default()).func.isRequired
|
|
104407
|
+
};
|
|
104408
|
+
function ProfileQuickLinkGroups(_ref2) {
|
|
104409
|
+
var groups = _ref2.groups,
|
|
104410
|
+
copy = _ref2.copy,
|
|
104411
|
+
editing = _ref2.editing,
|
|
104412
|
+
authService = _ref2.authService,
|
|
104413
|
+
onDismiss = _ref2.onDismiss;
|
|
104414
|
+
if (!groups.length) return null;
|
|
104415
|
+
return /*#__PURE__*/(0,jsx_runtime_.jsxs)(ProfileQuickLinksSection, {
|
|
104416
|
+
children: [/*#__PURE__*/(0,jsx_runtime_.jsx)(ProfileQuickLinksTitle, {
|
|
104417
|
+
children: copy.quick_links_heading
|
|
104418
|
+
}), groups.map(function (group) {
|
|
104419
|
+
return /*#__PURE__*/(0,jsx_runtime_.jsxs)(ProfileQuickLinkGroup, {
|
|
104420
|
+
children: [/*#__PURE__*/(0,jsx_runtime_.jsx)(ProfileQuickLinkGroupTitle, {
|
|
104421
|
+
children: group.title
|
|
104422
|
+
}), /*#__PURE__*/(0,jsx_runtime_.jsx)(ProfileLinkList, {
|
|
104423
|
+
children: group.links.map(function (link) {
|
|
104424
|
+
return /*#__PURE__*/(0,jsx_runtime_.jsx)(ProfileQuickLinkItem, {
|
|
104425
|
+
link: link,
|
|
104426
|
+
editing: editing,
|
|
104427
|
+
authService: authService,
|
|
104428
|
+
onDismiss: onDismiss
|
|
104429
|
+
}, "".concat(group.title, "-").concat(link.label));
|
|
104430
|
+
})
|
|
104431
|
+
})]
|
|
104432
|
+
}, group.title);
|
|
104433
|
+
})]
|
|
104434
|
+
});
|
|
104435
|
+
}
|
|
104436
|
+
ProfileQuickLinkGroups.propTypes = {
|
|
104437
|
+
groups: external_prop_types_default().arrayOf(external_prop_types_default().shape({
|
|
104438
|
+
title: (external_prop_types_default()).string.isRequired,
|
|
104439
|
+
links: (external_prop_types_default()).array.isRequired
|
|
104440
|
+
})).isRequired,
|
|
104441
|
+
copy: (external_prop_types_default()).object.isRequired,
|
|
104442
|
+
editing: (external_prop_types_default()).bool.isRequired,
|
|
104443
|
+
authService: (external_prop_types_default()).object,
|
|
104444
|
+
onDismiss: (external_prop_types_default()).func.isRequired
|
|
104445
|
+
};
|
|
104446
|
+
function ProfileVolumeStats(_ref3) {
|
|
104447
|
+
var volumeStats = _ref3.volumeStats;
|
|
104448
|
+
if (!volumeStats.dcSv && !volumeStats.gsv) return null;
|
|
104449
|
+
return /*#__PURE__*/(0,jsx_runtime_.jsxs)(ProfileVolumeStatsRow, {
|
|
104450
|
+
children: [volumeStats.dcSv ? /*#__PURE__*/(0,jsx_runtime_.jsxs)(ProfileVolumeStat, {
|
|
104451
|
+
children: [/*#__PURE__*/(0,jsx_runtime_.jsx)(ProfileVolumeBadge, {
|
|
104452
|
+
children: volumeStats.dcSv
|
|
104453
|
+
}), /*#__PURE__*/(0,jsx_runtime_.jsx)(ProfileVolumeLabel, {
|
|
104454
|
+
children: "DC-SV"
|
|
104455
|
+
})]
|
|
104456
|
+
}) : null, volumeStats.gsv ? /*#__PURE__*/(0,jsx_runtime_.jsxs)(ProfileVolumeStat, {
|
|
104457
|
+
children: [/*#__PURE__*/(0,jsx_runtime_.jsx)(ProfileVolumeBadge, {
|
|
104458
|
+
children: volumeStats.gsv
|
|
104459
|
+
}), /*#__PURE__*/(0,jsx_runtime_.jsx)(ProfileVolumeLabel, {
|
|
104460
|
+
children: "GSV"
|
|
104461
|
+
})]
|
|
104462
|
+
}) : null]
|
|
104463
|
+
});
|
|
104464
|
+
}
|
|
104465
|
+
ProfileVolumeStats.propTypes = {
|
|
104466
|
+
volumeStats: external_prop_types_default().shape({
|
|
104467
|
+
dcSv: (external_prop_types_default()).string,
|
|
104468
|
+
gsv: (external_prop_types_default()).string
|
|
104469
|
+
}).isRequired
|
|
104470
|
+
};
|
|
104471
|
+
function SignUpSignInProfilePanel(_ref4) {
|
|
104472
|
+
var copy = _ref4.copy,
|
|
104473
|
+
editing = _ref4.editing,
|
|
104474
|
+
authService = _ref4.authService,
|
|
104475
|
+
accountUrl = _ref4.accountUrl,
|
|
104476
|
+
profileSummary = _ref4.profileSummary,
|
|
104477
|
+
greetingName = _ref4.greetingName,
|
|
104478
|
+
customerPhotoUrl = _ref4.customerPhotoUrl,
|
|
104479
|
+
photoUrl = _ref4.photoUrl,
|
|
104480
|
+
resolvedIconName = _ref4.resolvedIconName,
|
|
104481
|
+
resolvedIconColor = _ref4.resolvedIconColor,
|
|
104482
|
+
accountType = _ref4.accountType,
|
|
104483
|
+
isBrandAffiliate = _ref4.isBrandAffiliate,
|
|
104484
|
+
volumeStats = _ref4.volumeStats,
|
|
104485
|
+
walletSummary = _ref4.walletSummary,
|
|
104486
|
+
walletUrl = _ref4.walletUrl,
|
|
104487
|
+
visibleQuickLinkGroups = _ref4.visibleQuickLinkGroups,
|
|
104488
|
+
copiedAccountId = _ref4.copiedAccountId,
|
|
104489
|
+
onCopyAccountId = _ref4.onCopyAccountId,
|
|
104490
|
+
onDismiss = _ref4.onDismiss;
|
|
104491
|
+
var handleViewProfile = function handleViewProfile() {
|
|
104492
|
+
onDismiss();
|
|
104493
|
+
handleAccountNavigate(editing, accountUrl, authService);
|
|
104494
|
+
};
|
|
104495
|
+
var handleWalletClick = function handleWalletClick() {
|
|
104496
|
+
onDismiss();
|
|
104497
|
+
handleProfileLinkNavigate(editing, walletUrl, authService);
|
|
104498
|
+
};
|
|
104499
|
+
var handleSignOut = function handleSignOut() {
|
|
104500
|
+
onDismiss();
|
|
104501
|
+
handleSignOutNavigate(editing, authService);
|
|
104502
|
+
};
|
|
104503
|
+
return /*#__PURE__*/(0,jsx_runtime_.jsxs)(jsx_runtime_.Fragment, {
|
|
104504
|
+
children: [/*#__PURE__*/(0,jsx_runtime_.jsxs)(ProfilePanelHeader, {
|
|
104505
|
+
children: [/*#__PURE__*/(0,jsx_runtime_.jsx)(ProfilePanelHeading, {
|
|
104506
|
+
children: copy.profile_heading
|
|
104507
|
+
}), /*#__PURE__*/(0,jsx_runtime_.jsxs)(ProfileViewAllButton, {
|
|
104508
|
+
type: "button",
|
|
104509
|
+
"data-testid": "account-view-profile",
|
|
104510
|
+
onClick: handleViewProfile,
|
|
104511
|
+
children: [copy.profile_view_all_label, /*#__PURE__*/(0,jsx_runtime_.jsx)(SignUpSignInProfilePanel_ArrowRightIcon, {})]
|
|
104512
|
+
})]
|
|
104513
|
+
}), /*#__PURE__*/(0,jsx_runtime_.jsxs)(ProfileIdentityBlock, {
|
|
104514
|
+
"data-testid": "account-profile-details",
|
|
104515
|
+
children: [customerPhotoUrl ? /*#__PURE__*/(0,jsx_runtime_.jsx)(ProfileAvatar, {
|
|
104516
|
+
src: photoUrl,
|
|
104517
|
+
alt: ""
|
|
104518
|
+
}) : /*#__PURE__*/(0,jsx_runtime_.jsx)(ProfileAvatarFallback, {
|
|
104519
|
+
"aria-hidden": true,
|
|
104520
|
+
children: /*#__PURE__*/(0,jsx_runtime_.jsx)(dist.NsIcon, {
|
|
104521
|
+
name: resolvedIconName,
|
|
104522
|
+
size: "large",
|
|
104523
|
+
colorOverride: resolvedIconColor
|
|
104524
|
+
})
|
|
104525
|
+
}), /*#__PURE__*/(0,jsx_runtime_.jsxs)(ProfileGreeting, {
|
|
104526
|
+
children: ["Hi, ", greetingName]
|
|
104527
|
+
}), accountType ? /*#__PURE__*/(0,jsx_runtime_.jsx)(ProfileAccountType, {
|
|
104528
|
+
children: accountType
|
|
104529
|
+
}) : null, profileSummary.accountId ? /*#__PURE__*/(0,jsx_runtime_.jsxs)(ProfileIdRow, {
|
|
104530
|
+
children: [/*#__PURE__*/(0,jsx_runtime_.jsxs)(ProfileIdText, {
|
|
104531
|
+
children: ["ID: ", profileSummary.accountId]
|
|
104532
|
+
}), /*#__PURE__*/(0,jsx_runtime_.jsx)(ProfileCopyButton, {
|
|
104533
|
+
type: "button",
|
|
104534
|
+
"aria-label": copiedAccountId ? copy.copied_id_label : copy.copy_id_label,
|
|
104535
|
+
title: copiedAccountId ? copy.copied_id_label : copy.copy_id_label,
|
|
104536
|
+
onClick: onCopyAccountId,
|
|
104537
|
+
children: /*#__PURE__*/(0,jsx_runtime_.jsx)(CopyIdIcon, {})
|
|
104538
|
+
})]
|
|
104539
|
+
}) : null, isBrandAffiliate ? /*#__PURE__*/(0,jsx_runtime_.jsxs)(ProfileAffiliateBadgeRow, {
|
|
104540
|
+
children: [/*#__PURE__*/(0,jsx_runtime_.jsx)(ProfileAffiliateBadgeIcon, {
|
|
104541
|
+
"aria-hidden": true,
|
|
104542
|
+
children: "BA"
|
|
104543
|
+
}), /*#__PURE__*/(0,jsx_runtime_.jsx)(ProfileAffiliateBadgeText, {
|
|
104544
|
+
children: accountType
|
|
104545
|
+
})]
|
|
104546
|
+
}) : null, isBrandAffiliate ? /*#__PURE__*/(0,jsx_runtime_.jsx)(ProfileVolumeStats, {
|
|
104547
|
+
volumeStats: volumeStats
|
|
104548
|
+
}) : null]
|
|
104549
|
+
}), /*#__PURE__*/(0,jsx_runtime_.jsxs)(ProfileWalletSection, {
|
|
104550
|
+
children: [/*#__PURE__*/(0,jsx_runtime_.jsxs)(ProfileWalletHeader, {
|
|
104551
|
+
type: "button",
|
|
104552
|
+
"data-testid": "profile-wallet-link",
|
|
104553
|
+
onClick: handleWalletClick,
|
|
104554
|
+
children: [copy.wallet_heading, /*#__PURE__*/(0,jsx_runtime_.jsx)(SignUpSignInProfilePanel_ArrowRightIcon, {})]
|
|
104555
|
+
}), /*#__PURE__*/(0,jsx_runtime_.jsxs)(ProfileWalletCards, {
|
|
104556
|
+
children: [/*#__PURE__*/(0,jsx_runtime_.jsxs)(ProfileWalletCard, {
|
|
104557
|
+
children: [/*#__PURE__*/(0,jsx_runtime_.jsx)(ProfileWalletValue, {
|
|
104558
|
+
children: walletSummary.storeCredit
|
|
104559
|
+
}), /*#__PURE__*/(0,jsx_runtime_.jsx)(ProfileWalletLabel, {
|
|
104560
|
+
children: copy.credit_label
|
|
104561
|
+
})]
|
|
104562
|
+
}), /*#__PURE__*/(0,jsx_runtime_.jsxs)(ProfileWalletCard, {
|
|
104563
|
+
children: [/*#__PURE__*/(0,jsx_runtime_.jsx)(ProfileWalletValue, {
|
|
104564
|
+
children: walletSummary.promoCount
|
|
104565
|
+
}), /*#__PURE__*/(0,jsx_runtime_.jsx)(ProfileWalletLabel, {
|
|
104566
|
+
children: copy.promos_label
|
|
104567
|
+
})]
|
|
104568
|
+
})]
|
|
104569
|
+
})]
|
|
104570
|
+
}), /*#__PURE__*/(0,jsx_runtime_.jsx)(ProfileQuickLinkGroups, {
|
|
104571
|
+
groups: visibleQuickLinkGroups,
|
|
104572
|
+
copy: copy,
|
|
104573
|
+
editing: editing,
|
|
104574
|
+
authService: authService,
|
|
104575
|
+
onDismiss: onDismiss
|
|
104576
|
+
}), /*#__PURE__*/(0,jsx_runtime_.jsxs)(ProfileSignOutButton, {
|
|
104577
|
+
type: "button",
|
|
104578
|
+
"data-testid": "account-sign-out",
|
|
104579
|
+
onClick: handleSignOut,
|
|
104580
|
+
children: [/*#__PURE__*/(0,jsx_runtime_.jsx)(SignOutIcon, {}), copy.sign_out_label]
|
|
104581
|
+
})]
|
|
104582
|
+
});
|
|
104583
|
+
}
|
|
104584
|
+
SignUpSignInProfilePanel.propTypes = {
|
|
104585
|
+
copy: (external_prop_types_default()).object.isRequired,
|
|
104586
|
+
editing: (external_prop_types_default()).bool.isRequired,
|
|
104587
|
+
authService: (external_prop_types_default()).object,
|
|
104588
|
+
accountUrl: (external_prop_types_default()).string,
|
|
104589
|
+
profileSummary: external_prop_types_default().shape({
|
|
104590
|
+
accountId: (external_prop_types_default()).string,
|
|
104591
|
+
displayName: (external_prop_types_default()).string,
|
|
104592
|
+
email: (external_prop_types_default()).string
|
|
104593
|
+
}).isRequired,
|
|
104594
|
+
greetingName: (external_prop_types_default()).string.isRequired,
|
|
104595
|
+
customerPhotoUrl: (external_prop_types_default()).string,
|
|
104596
|
+
photoUrl: (external_prop_types_default()).string.isRequired,
|
|
104597
|
+
resolvedIconName: (external_prop_types_default()).string.isRequired,
|
|
104598
|
+
resolvedIconColor: (external_prop_types_default()).string,
|
|
104599
|
+
accountType: (external_prop_types_default()).string,
|
|
104600
|
+
isBrandAffiliate: (external_prop_types_default()).bool.isRequired,
|
|
104601
|
+
volumeStats: external_prop_types_default().shape({
|
|
104602
|
+
dcSv: (external_prop_types_default()).string,
|
|
104603
|
+
gsv: (external_prop_types_default()).string
|
|
104604
|
+
}).isRequired,
|
|
104605
|
+
walletSummary: external_prop_types_default().shape({
|
|
104606
|
+
storeCredit: (external_prop_types_default()).number,
|
|
104607
|
+
promoCount: (external_prop_types_default()).number
|
|
104608
|
+
}).isRequired,
|
|
104609
|
+
walletUrl: (external_prop_types_default()).string.isRequired,
|
|
104610
|
+
visibleQuickLinkGroups: (external_prop_types_default()).array.isRequired,
|
|
104611
|
+
copiedAccountId: (external_prop_types_default()).bool.isRequired,
|
|
104612
|
+
onCopyAccountId: (external_prop_types_default()).func.isRequired,
|
|
104613
|
+
onDismiss: (external_prop_types_default()).func.isRequired
|
|
104614
|
+
};
|
|
104615
|
+
;// ./src/components/signup-signin/SignUpSignInViews.jsx
|
|
104616
|
+
function SignUpSignInViews_typeof(o) { "@babel/helpers - typeof"; return SignUpSignInViews_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; }, SignUpSignInViews_typeof(o); }
|
|
104617
|
+
function SignUpSignInViews_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; }
|
|
104618
|
+
function SignUpSignInViews_objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? SignUpSignInViews_ownKeys(Object(t), !0).forEach(function (r) { SignUpSignInViews_defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : SignUpSignInViews_ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
104619
|
+
function SignUpSignInViews_defineProperty(e, r, t) { return (r = SignUpSignInViews_toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
104620
|
+
function SignUpSignInViews_toPropertyKey(t) { var i = SignUpSignInViews_toPrimitive(t, "string"); return "symbol" == SignUpSignInViews_typeof(i) ? i : i + ""; }
|
|
104621
|
+
function SignUpSignInViews_toPrimitive(t, r) { if ("object" != SignUpSignInViews_typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != SignUpSignInViews_typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
104622
|
+
|
|
104623
|
+
|
|
104624
|
+
|
|
104625
|
+
|
|
104626
|
+
|
|
104627
|
+
|
|
104628
|
+
|
|
104629
|
+
|
|
104630
|
+
function DesktopGuestSignupSection(_ref) {
|
|
104631
|
+
var isMobile = _ref.isMobile,
|
|
104632
|
+
showGuestAuth = _ref.showGuestAuth,
|
|
104633
|
+
effectiveSignUpTitle = _ref.effectiveSignUpTitle,
|
|
104634
|
+
effectiveSignUp = _ref.effectiveSignUp,
|
|
104635
|
+
editing = _ref.editing,
|
|
104636
|
+
authService = _ref.authService,
|
|
104637
|
+
parent$ = _ref.parent$,
|
|
104638
|
+
resolvedIconName = _ref.resolvedIconName,
|
|
104639
|
+
resolvedIconColor = _ref.resolvedIconColor;
|
|
104640
|
+
if (isMobile || !showGuestAuth) {
|
|
104641
|
+
return null;
|
|
104642
|
+
}
|
|
104643
|
+
return /*#__PURE__*/(0,jsx_runtime_.jsxs)(jsx_runtime_.Fragment, {
|
|
104644
|
+
children: [/*#__PURE__*/(0,jsx_runtime_.jsxs)(SignUpLink, SignUpSignInViews_objectSpread(SignUpSignInViews_objectSpread({
|
|
104645
|
+
"data-testid": "signup-link",
|
|
104646
|
+
"aria-label": effectiveSignUpTitle,
|
|
104647
|
+
type: "button"
|
|
104648
|
+
}, parentEditableProps(parent$, "sign_up_url")), {}, {
|
|
104649
|
+
onClick: function onClick() {
|
|
104650
|
+
return handleSignUpNavigate(editing, effectiveSignUp === null || effectiveSignUp === void 0 ? void 0 : effectiveSignUp.url, authService);
|
|
104651
|
+
},
|
|
104652
|
+
onKeyDown: handleKeyboardActivate,
|
|
104653
|
+
children: [/*#__PURE__*/(0,jsx_runtime_.jsx)("div", SignUpSignInViews_objectSpread(SignUpSignInViews_objectSpread({}, parentEditableProps(parent$, "icon")), {}, {
|
|
104654
|
+
className: "icon-container",
|
|
104655
|
+
children: /*#__PURE__*/(0,jsx_runtime_.jsx)(IconWrap, SignUpSignInViews_objectSpread(SignUpSignInViews_objectSpread({}, parentEditableProps(parent$, "icon_color")), {}, {
|
|
104656
|
+
"aria-hidden": true,
|
|
104657
|
+
children: /*#__PURE__*/(0,jsx_runtime_.jsx)(dist.NsIcon, {
|
|
104658
|
+
name: resolvedIconName,
|
|
104659
|
+
size: "large",
|
|
104660
|
+
colorOverride: resolvedIconColor
|
|
104661
|
+
})
|
|
104662
|
+
}))
|
|
104663
|
+
})), /*#__PURE__*/(0,jsx_runtime_.jsx)(SignTextLink, SignUpSignInViews_objectSpread(SignUpSignInViews_objectSpread({
|
|
104664
|
+
as: "span"
|
|
104665
|
+
}, parentEditableProps(parent$, "sign_up")), {}, {
|
|
104666
|
+
children: effectiveSignUpTitle
|
|
104667
|
+
}))]
|
|
104668
|
+
})), /*#__PURE__*/(0,jsx_runtime_.jsx)(Divider, {
|
|
104669
|
+
"aria-hidden": true,
|
|
104670
|
+
children: "/"
|
|
104671
|
+
})]
|
|
104672
|
+
});
|
|
104673
|
+
}
|
|
104674
|
+
DesktopGuestSignupSection.propTypes = {
|
|
104675
|
+
isMobile: (external_prop_types_default()).bool.isRequired,
|
|
104676
|
+
showGuestAuth: (external_prop_types_default()).bool.isRequired,
|
|
104677
|
+
effectiveSignUpTitle: (external_prop_types_default()).string.isRequired,
|
|
104678
|
+
effectiveSignUp: authLinkPropType,
|
|
104679
|
+
editing: (external_prop_types_default()).bool.isRequired,
|
|
104680
|
+
authService: authServicePropType,
|
|
104681
|
+
parent$: parentTagsPropType,
|
|
104682
|
+
resolvedIconName: (external_prop_types_default()).string.isRequired,
|
|
104683
|
+
resolvedIconColor: (external_prop_types_default()).string
|
|
104684
|
+
};
|
|
104685
|
+
function GuestSignInButton(_ref2) {
|
|
104686
|
+
var effectiveSignInTitle = _ref2.effectiveSignInTitle,
|
|
104687
|
+
parent$ = _ref2.parent$,
|
|
104688
|
+
editing = _ref2.editing,
|
|
104689
|
+
isMobile = _ref2.isMobile,
|
|
104690
|
+
setIsModalOpen = _ref2.setIsModalOpen,
|
|
104691
|
+
effectiveSignIn = _ref2.effectiveSignIn,
|
|
104692
|
+
authService = _ref2.authService;
|
|
104693
|
+
return /*#__PURE__*/(0,jsx_runtime_.jsx)(SignInLink, SignUpSignInViews_objectSpread(SignUpSignInViews_objectSpread({
|
|
104694
|
+
"data-testid": "signin-button",
|
|
104695
|
+
"aria-label": effectiveSignInTitle
|
|
104696
|
+
}, parentEditableProps(parent$, "sign_in")), {}, {
|
|
104697
|
+
onClick: function onClick() {
|
|
104698
|
+
return handleSignInActivate(editing, isMobile, setIsModalOpen, effectiveSignIn === null || effectiveSignIn === void 0 ? void 0 : effectiveSignIn.url, authService);
|
|
104699
|
+
},
|
|
104700
|
+
onKeyDown: handleKeyboardActivate,
|
|
104701
|
+
type: "button",
|
|
104702
|
+
children: /*#__PURE__*/(0,jsx_runtime_.jsx)("span", SignUpSignInViews_objectSpread(SignUpSignInViews_objectSpread({}, parentEditableProps(parent$, "sign_in")), {}, {
|
|
104703
|
+
children: effectiveSignInTitle
|
|
104704
|
+
}))
|
|
104705
|
+
}));
|
|
104706
|
+
}
|
|
104707
|
+
GuestSignInButton.propTypes = {
|
|
104708
|
+
effectiveSignInTitle: (external_prop_types_default()).string.isRequired,
|
|
104709
|
+
parent$: parentTagsPropType,
|
|
104710
|
+
editing: (external_prop_types_default()).bool.isRequired,
|
|
104711
|
+
isMobile: (external_prop_types_default()).bool.isRequired,
|
|
104712
|
+
setIsModalOpen: (external_prop_types_default()).func.isRequired,
|
|
104713
|
+
effectiveSignIn: authLinkPropType,
|
|
104714
|
+
authService: authServicePropType
|
|
104715
|
+
};
|
|
104716
|
+
function AuthenticatedAccountMenu(_ref3) {
|
|
104717
|
+
var menuRef = _ref3.menuRef,
|
|
104718
|
+
isAccountMenuOpen = _ref3.isAccountMenuOpen,
|
|
104719
|
+
greetingName = _ref3.greetingName,
|
|
104720
|
+
accountToggleLabel = _ref3.accountToggleLabel,
|
|
104721
|
+
resolvedIconName = _ref3.resolvedIconName,
|
|
104722
|
+
resolvedIconColor = _ref3.resolvedIconColor,
|
|
104723
|
+
parent$ = _ref3.parent$,
|
|
104724
|
+
onAuthenticatedClick = _ref3.onAuthenticatedClick,
|
|
104725
|
+
profilePanelProps = _ref3.profilePanelProps,
|
|
104726
|
+
isMobile = _ref3.isMobile;
|
|
104727
|
+
var accountMenuPanel = /*#__PURE__*/(0,jsx_runtime_.jsx)(AccountDropdownPanel, {
|
|
104728
|
+
"data-testid": "account-menu-panel",
|
|
104729
|
+
role: "menu",
|
|
104730
|
+
children: /*#__PURE__*/(0,jsx_runtime_.jsx)(SignUpSignInProfilePanel, SignUpSignInViews_objectSpread({}, profilePanelProps))
|
|
104731
|
+
});
|
|
104732
|
+
return /*#__PURE__*/(0,jsx_runtime_.jsxs)(AccountMenuRoot, {
|
|
104733
|
+
ref: menuRef,
|
|
104734
|
+
children: [/*#__PURE__*/(0,jsx_runtime_.jsxs)(AccountToggle, SignUpSignInViews_objectSpread(SignUpSignInViews_objectSpread({
|
|
104735
|
+
"data-testid": "signin-button",
|
|
104736
|
+
type: "button",
|
|
104737
|
+
"aria-label": "Hi ".concat(greetingName),
|
|
104738
|
+
"aria-expanded": isAccountMenuOpen,
|
|
104739
|
+
"aria-haspopup": "menu"
|
|
104740
|
+
}, parentEditableProps(parent$, "signed_in")), {}, {
|
|
104741
|
+
onClick: onAuthenticatedClick,
|
|
104742
|
+
onKeyDown: handleKeyboardActivate,
|
|
104743
|
+
children: [/*#__PURE__*/(0,jsx_runtime_.jsx)(AccountIconWrap, {
|
|
104744
|
+
"aria-hidden": true,
|
|
104745
|
+
children: /*#__PURE__*/(0,jsx_runtime_.jsx)(dist.NsIcon, {
|
|
104746
|
+
name: resolvedIconName,
|
|
104747
|
+
size: "large",
|
|
104748
|
+
colorOverride: resolvedIconColor
|
|
104749
|
+
})
|
|
104750
|
+
}), /*#__PURE__*/(0,jsx_runtime_.jsx)(AccountUserName, {
|
|
104751
|
+
children: accountToggleLabel
|
|
104752
|
+
})]
|
|
104753
|
+
})), isAccountMenuOpen && !isMobile ? accountMenuPanel : null]
|
|
104754
|
+
});
|
|
104755
|
+
}
|
|
104756
|
+
AuthenticatedAccountMenu.propTypes = {
|
|
104757
|
+
menuRef: external_prop_types_default().shape({
|
|
104758
|
+
current: (external_prop_types_default()).any
|
|
104759
|
+
}),
|
|
104760
|
+
isAccountMenuOpen: (external_prop_types_default()).bool.isRequired,
|
|
104761
|
+
greetingName: (external_prop_types_default()).string.isRequired,
|
|
104762
|
+
accountToggleLabel: (external_prop_types_default()).string.isRequired,
|
|
104763
|
+
resolvedIconName: (external_prop_types_default()).string.isRequired,
|
|
104764
|
+
resolvedIconColor: (external_prop_types_default()).string,
|
|
104765
|
+
parent$: parentTagsPropType,
|
|
104766
|
+
onAuthenticatedClick: (external_prop_types_default()).func.isRequired,
|
|
104767
|
+
profilePanelProps: (external_prop_types_default()).object.isRequired,
|
|
104768
|
+
isMobile: (external_prop_types_default()).bool.isRequired
|
|
104769
|
+
};
|
|
104770
|
+
function PrimaryAuthActions(_ref4) {
|
|
104771
|
+
var isAuthenticated = _ref4.isAuthenticated,
|
|
104772
|
+
menuRef = _ref4.menuRef,
|
|
104773
|
+
isAccountMenuOpen = _ref4.isAccountMenuOpen,
|
|
104774
|
+
greetingName = _ref4.greetingName,
|
|
104775
|
+
accountToggleLabel = _ref4.accountToggleLabel,
|
|
104776
|
+
resolvedIconName = _ref4.resolvedIconName,
|
|
104777
|
+
resolvedIconColor = _ref4.resolvedIconColor,
|
|
104778
|
+
parent$ = _ref4.parent$,
|
|
104779
|
+
onAuthenticatedClick = _ref4.onAuthenticatedClick,
|
|
104780
|
+
profilePanelProps = _ref4.profilePanelProps,
|
|
104781
|
+
isMobile = _ref4.isMobile,
|
|
104782
|
+
effectiveSignInTitle = _ref4.effectiveSignInTitle,
|
|
104783
|
+
effectiveSignIn = _ref4.effectiveSignIn,
|
|
104784
|
+
authService = _ref4.authService,
|
|
104785
|
+
setIsModalOpen = _ref4.setIsModalOpen,
|
|
104786
|
+
editing = _ref4.editing;
|
|
104787
|
+
if (!isAuthenticated) {
|
|
104788
|
+
return /*#__PURE__*/(0,jsx_runtime_.jsx)(GuestSignInButton, {
|
|
104789
|
+
effectiveSignInTitle: effectiveSignInTitle,
|
|
104790
|
+
parent$: parent$,
|
|
104791
|
+
editing: editing,
|
|
104792
|
+
isMobile: isMobile,
|
|
104793
|
+
setIsModalOpen: setIsModalOpen,
|
|
104794
|
+
effectiveSignIn: effectiveSignIn,
|
|
104795
|
+
authService: authService
|
|
104796
|
+
});
|
|
104797
|
+
}
|
|
104798
|
+
return /*#__PURE__*/(0,jsx_runtime_.jsx)(AuthenticatedAccountMenu, {
|
|
104799
|
+
menuRef: menuRef,
|
|
104800
|
+
isAccountMenuOpen: isAccountMenuOpen,
|
|
104801
|
+
greetingName: greetingName,
|
|
104802
|
+
accountToggleLabel: accountToggleLabel,
|
|
104803
|
+
resolvedIconName: resolvedIconName,
|
|
104804
|
+
resolvedIconColor: resolvedIconColor,
|
|
104805
|
+
parent$: parent$,
|
|
104806
|
+
onAuthenticatedClick: onAuthenticatedClick,
|
|
104807
|
+
profilePanelProps: profilePanelProps,
|
|
104808
|
+
isMobile: isMobile
|
|
104809
|
+
});
|
|
104810
|
+
}
|
|
104811
|
+
PrimaryAuthActions.propTypes = {
|
|
104812
|
+
isAuthenticated: (external_prop_types_default()).bool.isRequired,
|
|
104813
|
+
menuRef: external_prop_types_default().shape({
|
|
104814
|
+
current: (external_prop_types_default()).any
|
|
104815
|
+
}),
|
|
104816
|
+
isAccountMenuOpen: (external_prop_types_default()).bool.isRequired,
|
|
104817
|
+
greetingName: (external_prop_types_default()).string.isRequired,
|
|
104818
|
+
accountToggleLabel: (external_prop_types_default()).string.isRequired,
|
|
104819
|
+
resolvedIconName: (external_prop_types_default()).string.isRequired,
|
|
104820
|
+
resolvedIconColor: (external_prop_types_default()).string,
|
|
104821
|
+
parent$: parentTagsPropType,
|
|
104822
|
+
onAuthenticatedClick: (external_prop_types_default()).func.isRequired,
|
|
104823
|
+
profilePanelProps: (external_prop_types_default()).object.isRequired,
|
|
104824
|
+
isMobile: (external_prop_types_default()).bool.isRequired,
|
|
104825
|
+
effectiveSignInTitle: (external_prop_types_default()).string.isRequired,
|
|
104826
|
+
effectiveSignIn: authLinkPropType,
|
|
104827
|
+
authService: authServicePropType,
|
|
104828
|
+
setIsModalOpen: (external_prop_types_default()).func.isRequired,
|
|
104829
|
+
editing: (external_prop_types_default()).bool.isRequired
|
|
104830
|
+
};
|
|
104831
|
+
function GuestMobileModalBody(_ref5) {
|
|
104832
|
+
var copy = _ref5.copy,
|
|
104833
|
+
editing = _ref5.editing,
|
|
104834
|
+
closeModal = _ref5.closeModal,
|
|
104835
|
+
effectiveSignIn = _ref5.effectiveSignIn,
|
|
104836
|
+
effectiveSignUp = _ref5.effectiveSignUp,
|
|
104837
|
+
authService = _ref5.authService;
|
|
104838
|
+
return /*#__PURE__*/(0,jsx_runtime_.jsxs)(ModalSections, {
|
|
104839
|
+
children: [/*#__PURE__*/(0,jsx_runtime_.jsxs)(ModalSection, {
|
|
104840
|
+
children: [/*#__PURE__*/(0,jsx_runtime_.jsx)(SectionTitle, {
|
|
104841
|
+
children: copy.sign_in_heading
|
|
104842
|
+
}), /*#__PURE__*/(0,jsx_runtime_.jsx)(SectionMessage, {
|
|
104843
|
+
children: copy.sign_in_message
|
|
104844
|
+
}), /*#__PURE__*/(0,jsx_runtime_.jsx)(PrimaryButton, {
|
|
104845
|
+
type: "button",
|
|
104846
|
+
"data-testid": "signin-modal-signin-cta",
|
|
103501
104847
|
onClick: function onClick() {
|
|
103502
|
-
return
|
|
104848
|
+
return handleModalAuthNavigate(editing, closeModal, effectiveSignIn === null || effectiveSignIn === void 0 ? void 0 : effectiveSignIn.url, authService, "navigateToSignIn");
|
|
103503
104849
|
},
|
|
103504
|
-
|
|
103505
|
-
children: [/*#__PURE__*/(0,jsx_runtime_.jsx)("div", SignUpOrSignIn_objectSpread(SignUpOrSignIn_objectSpread({}, parentEditableProps(parent$, "icon")), {}, {
|
|
103506
|
-
className: "icon-container",
|
|
103507
|
-
children: /*#__PURE__*/(0,jsx_runtime_.jsx)(IconWrap, SignUpOrSignIn_objectSpread(SignUpOrSignIn_objectSpread({}, parentEditableProps(parent$, "icon_color")), {}, {
|
|
103508
|
-
"aria-hidden": true,
|
|
103509
|
-
children: /*#__PURE__*/(0,jsx_runtime_.jsx)(dist.NsIcon, {
|
|
103510
|
-
name: resolvedIconName,
|
|
103511
|
-
size: "large",
|
|
103512
|
-
colorOverride: resolvedIconColor
|
|
103513
|
-
})
|
|
103514
|
-
}))
|
|
103515
|
-
})), /*#__PURE__*/(0,jsx_runtime_.jsx)(SignTextLink, SignUpOrSignIn_objectSpread(SignUpOrSignIn_objectSpread({
|
|
103516
|
-
as: "span"
|
|
103517
|
-
}, parentEditableProps(parent$, "sign_up")), {}, {
|
|
103518
|
-
children: effectiveSignUpTitle
|
|
103519
|
-
}))]
|
|
103520
|
-
})), /*#__PURE__*/(0,jsx_runtime_.jsx)(Divider, {
|
|
103521
|
-
"aria-hidden": true,
|
|
103522
|
-
children: "/"
|
|
104850
|
+
children: copy.sign_in_cta_label
|
|
103523
104851
|
})]
|
|
103524
|
-
})
|
|
103525
|
-
|
|
103526
|
-
|
|
103527
|
-
|
|
103528
|
-
|
|
103529
|
-
|
|
103530
|
-
|
|
103531
|
-
|
|
103532
|
-
|
|
103533
|
-
|
|
103534
|
-
children: effectiveSignInTitle
|
|
103535
|
-
}))
|
|
103536
|
-
})), showMobileModal ? /*#__PURE__*/(0,jsx_runtime_.jsx)(MobileAuthModalBackdrop, {
|
|
103537
|
-
"data-testid": "signin-modal-backdrop",
|
|
103538
|
-
onClick: closeModal,
|
|
103539
|
-
children: /*#__PURE__*/(0,jsx_runtime_.jsxs)(MobileAuthModal, {
|
|
103540
|
-
open: true,
|
|
103541
|
-
"aria-modal": "true",
|
|
103542
|
-
"aria-label": effectiveSignInTitle,
|
|
103543
|
-
onClick: function onClick(e) {
|
|
103544
|
-
return e.stopPropagation();
|
|
104852
|
+
}), /*#__PURE__*/(0,jsx_runtime_.jsxs)(ModalSection, {
|
|
104853
|
+
children: [/*#__PURE__*/(0,jsx_runtime_.jsx)(SectionTitle, {
|
|
104854
|
+
children: copy.sign_up_heading
|
|
104855
|
+
}), /*#__PURE__*/(0,jsx_runtime_.jsx)(SectionMessage, {
|
|
104856
|
+
children: copy.sign_up_message
|
|
104857
|
+
}), /*#__PURE__*/(0,jsx_runtime_.jsx)(OutlinedButton, {
|
|
104858
|
+
"data-testid": "signin-modal-create-account-cta",
|
|
104859
|
+
type: "button",
|
|
104860
|
+
onClick: function onClick() {
|
|
104861
|
+
return handleModalAuthNavigate(editing, closeModal, effectiveSignUp === null || effectiveSignUp === void 0 ? void 0 : effectiveSignUp.url, authService, "navigateToSignUp");
|
|
103545
104862
|
},
|
|
103546
|
-
|
|
103547
|
-
|
|
103548
|
-
|
|
103549
|
-
|
|
103550
|
-
type: "button",
|
|
103551
|
-
onClick: closeModal,
|
|
103552
|
-
children: "\xD7"
|
|
103553
|
-
})
|
|
103554
|
-
}), /*#__PURE__*/(0,jsx_runtime_.jsx)(ModalContent, {
|
|
103555
|
-
children: /*#__PURE__*/(0,jsx_runtime_.jsxs)(ModalSections, {
|
|
103556
|
-
children: [/*#__PURE__*/(0,jsx_runtime_.jsxs)(ModalSection, {
|
|
103557
|
-
children: [/*#__PURE__*/(0,jsx_runtime_.jsx)(SectionTitle, {
|
|
103558
|
-
children: modal_copy === null || modal_copy === void 0 ? void 0 : modal_copy.sign_in_heading
|
|
103559
|
-
}), /*#__PURE__*/(0,jsx_runtime_.jsx)(SectionMessage, {
|
|
103560
|
-
children: modal_copy === null || modal_copy === void 0 ? void 0 : modal_copy.sign_in_message
|
|
103561
|
-
}), /*#__PURE__*/(0,jsx_runtime_.jsx)(PrimaryButton, {
|
|
103562
|
-
type: "button",
|
|
103563
|
-
"data-testid": "signin-modal-signin-cta",
|
|
103564
|
-
onClick: function onClick() {
|
|
103565
|
-
return handleModalAuthNavigate(editing, closeModal, effectiveSignIn === null || effectiveSignIn === void 0 ? void 0 : effectiveSignIn.url);
|
|
103566
|
-
},
|
|
103567
|
-
children: modal_copy === null || modal_copy === void 0 ? void 0 : modal_copy.sign_in_cta_label
|
|
103568
|
-
})]
|
|
103569
|
-
}), /*#__PURE__*/(0,jsx_runtime_.jsxs)(ModalSection, {
|
|
103570
|
-
children: [/*#__PURE__*/(0,jsx_runtime_.jsx)(SectionTitle, {
|
|
103571
|
-
children: modal_copy === null || modal_copy === void 0 ? void 0 : modal_copy.sign_up_heading
|
|
103572
|
-
}), /*#__PURE__*/(0,jsx_runtime_.jsx)(SectionMessage, {
|
|
103573
|
-
children: modal_copy === null || modal_copy === void 0 ? void 0 : modal_copy.sign_up_message
|
|
103574
|
-
}), /*#__PURE__*/(0,jsx_runtime_.jsx)(OutlinedButton, {
|
|
103575
|
-
"data-testid": "signin-modal-create-account-cta",
|
|
103576
|
-
type: "button",
|
|
103577
|
-
onClick: function onClick() {
|
|
103578
|
-
return handleModalAuthNavigate(editing, closeModal, effectiveSignUp === null || effectiveSignUp === void 0 ? void 0 : effectiveSignUp.url);
|
|
103579
|
-
},
|
|
103580
|
-
"aria-label": modal_copy === null || modal_copy === void 0 ? void 0 : modal_copy.sign_up_cta_aria_label,
|
|
103581
|
-
children: modal_copy === null || modal_copy === void 0 ? void 0 : modal_copy.sign_up_cta_label
|
|
103582
|
-
})]
|
|
103583
|
-
})]
|
|
103584
|
-
})
|
|
103585
|
-
})]
|
|
103586
|
-
})
|
|
103587
|
-
}) : null]
|
|
104863
|
+
"aria-label": copy.sign_up_cta_aria_label,
|
|
104864
|
+
children: copy.sign_up_cta_label
|
|
104865
|
+
})]
|
|
104866
|
+
})]
|
|
103588
104867
|
});
|
|
103589
104868
|
}
|
|
103590
|
-
|
|
103591
|
-
|
|
103592
|
-
|
|
103593
|
-
|
|
103594
|
-
|
|
103595
|
-
|
|
103596
|
-
|
|
103597
|
-
|
|
103598
|
-
|
|
103599
|
-
|
|
103600
|
-
|
|
103601
|
-
|
|
103602
|
-
|
|
103603
|
-
|
|
103604
|
-
|
|
103605
|
-
|
|
103606
|
-
|
|
103607
|
-
|
|
103608
|
-
|
|
103609
|
-
|
|
103610
|
-
|
|
103611
|
-
|
|
103612
|
-
|
|
103613
|
-
|
|
103614
|
-
|
|
103615
|
-
|
|
103616
|
-
|
|
103617
|
-
|
|
103618
|
-
|
|
103619
|
-
|
|
103620
|
-
|
|
103621
|
-
|
|
103622
|
-
|
|
104869
|
+
GuestMobileModalBody.propTypes = {
|
|
104870
|
+
copy: modalCopyPropType.isRequired,
|
|
104871
|
+
editing: (external_prop_types_default()).bool.isRequired,
|
|
104872
|
+
closeModal: (external_prop_types_default()).func.isRequired,
|
|
104873
|
+
effectiveSignIn: authLinkPropType,
|
|
104874
|
+
effectiveSignUp: authLinkPropType,
|
|
104875
|
+
authService: authServicePropType
|
|
104876
|
+
};
|
|
104877
|
+
function MobileAuthOverlay(_ref6) {
|
|
104878
|
+
var show = _ref6.show,
|
|
104879
|
+
onDismiss = _ref6.onDismiss,
|
|
104880
|
+
copy = _ref6.copy,
|
|
104881
|
+
isAuthenticated = _ref6.isAuthenticated,
|
|
104882
|
+
accountToggleLabel = _ref6.accountToggleLabel,
|
|
104883
|
+
effectiveSignInTitle = _ref6.effectiveSignInTitle,
|
|
104884
|
+
profilePanelProps = _ref6.profilePanelProps,
|
|
104885
|
+
editing = _ref6.editing,
|
|
104886
|
+
closeModal = _ref6.closeModal,
|
|
104887
|
+
effectiveSignIn = _ref6.effectiveSignIn,
|
|
104888
|
+
effectiveSignUp = _ref6.effectiveSignUp,
|
|
104889
|
+
authService = _ref6.authService;
|
|
104890
|
+
if (!show) {
|
|
104891
|
+
return null;
|
|
104892
|
+
}
|
|
104893
|
+
var modalAriaLabel = isAuthenticated ? accountToggleLabel : effectiveSignInTitle;
|
|
104894
|
+
var modalInner = isAuthenticated ? /*#__PURE__*/(0,jsx_runtime_.jsx)(ModalSections, {
|
|
104895
|
+
children: /*#__PURE__*/(0,jsx_runtime_.jsx)(ModalSection, {
|
|
104896
|
+
children: /*#__PURE__*/(0,jsx_runtime_.jsx)(SignUpSignInProfilePanel, SignUpSignInViews_objectSpread({}, profilePanelProps))
|
|
104897
|
+
})
|
|
104898
|
+
}) : /*#__PURE__*/(0,jsx_runtime_.jsx)(GuestMobileModalBody, {
|
|
104899
|
+
copy: copy,
|
|
104900
|
+
editing: editing,
|
|
104901
|
+
closeModal: closeModal,
|
|
104902
|
+
effectiveSignIn: effectiveSignIn,
|
|
104903
|
+
effectiveSignUp: effectiveSignUp,
|
|
104904
|
+
authService: authService
|
|
104905
|
+
});
|
|
104906
|
+
return /*#__PURE__*/(0,jsx_runtime_.jsx)(MobileAuthModalBackdrop, {
|
|
104907
|
+
"data-testid": "signin-modal-backdrop",
|
|
104908
|
+
onClick: onDismiss,
|
|
104909
|
+
children: /*#__PURE__*/(0,jsx_runtime_.jsxs)(MobileAuthModal, {
|
|
104910
|
+
open: true,
|
|
104911
|
+
"aria-modal": "true",
|
|
104912
|
+
"aria-label": modalAriaLabel,
|
|
104913
|
+
onClick: function onClick(e) {
|
|
104914
|
+
return e.stopPropagation();
|
|
104915
|
+
},
|
|
104916
|
+
children: [/*#__PURE__*/(0,jsx_runtime_.jsx)(ModalHeaderRow, {
|
|
104917
|
+
children: /*#__PURE__*/(0,jsx_runtime_.jsx)(ModalCancelButton, {
|
|
104918
|
+
"data-testid": "signin-modal-cancel",
|
|
104919
|
+
"aria-label": copy.close_dialog_aria_label,
|
|
104920
|
+
type: "button",
|
|
104921
|
+
onClick: onDismiss,
|
|
104922
|
+
children: "\xD7"
|
|
104923
|
+
})
|
|
104924
|
+
}), /*#__PURE__*/(0,jsx_runtime_.jsx)(ModalContent, {
|
|
104925
|
+
children: modalInner
|
|
104926
|
+
})]
|
|
104927
|
+
})
|
|
104928
|
+
});
|
|
104929
|
+
}
|
|
104930
|
+
MobileAuthOverlay.propTypes = {
|
|
104931
|
+
show: (external_prop_types_default()).bool.isRequired,
|
|
104932
|
+
onDismiss: (external_prop_types_default()).func.isRequired,
|
|
104933
|
+
copy: modalCopyPropType.isRequired,
|
|
104934
|
+
isAuthenticated: (external_prop_types_default()).bool.isRequired,
|
|
104935
|
+
accountToggleLabel: (external_prop_types_default()).string.isRequired,
|
|
104936
|
+
effectiveSignInTitle: (external_prop_types_default()).string.isRequired,
|
|
104937
|
+
profilePanelProps: (external_prop_types_default()).object.isRequired,
|
|
104938
|
+
editing: (external_prop_types_default()).bool.isRequired,
|
|
104939
|
+
closeModal: (external_prop_types_default()).func.isRequired,
|
|
104940
|
+
effectiveSignIn: authLinkPropType,
|
|
104941
|
+
effectiveSignUp: authLinkPropType,
|
|
104942
|
+
authService: authServicePropType
|
|
103623
104943
|
};
|
|
104944
|
+
;// ./src/components/signup-signin/SignUpSignIn.jsx
|
|
104945
|
+
|
|
104946
|
+
|
|
104947
|
+
|
|
104948
|
+
|
|
104949
|
+
|
|
104950
|
+
|
|
104951
|
+
|
|
104952
|
+
function SignUpSignIn(_ref) {
|
|
104953
|
+
var show = _ref.show,
|
|
104954
|
+
icon = _ref.icon,
|
|
104955
|
+
icon_color = _ref.icon_color,
|
|
104956
|
+
sign_up = _ref.sign_up,
|
|
104957
|
+
sign_in = _ref.sign_in,
|
|
104958
|
+
signed_in = _ref.signed_in,
|
|
104959
|
+
profile_utility_links = _ref.profile_utility_links,
|
|
104960
|
+
modal_copy = _ref.modal_copy,
|
|
104961
|
+
authService = _ref.authService,
|
|
104962
|
+
customerData = _ref.customerData,
|
|
104963
|
+
parent$ = _ref.parent$;
|
|
104964
|
+
var _useSignUpSignIn = useSignUpSignIn({
|
|
104965
|
+
show: show,
|
|
104966
|
+
icon: icon,
|
|
104967
|
+
icon_color: icon_color,
|
|
104968
|
+
sign_up: sign_up,
|
|
104969
|
+
sign_in: sign_in,
|
|
104970
|
+
signed_in: signed_in,
|
|
104971
|
+
profile_utility_links: profile_utility_links,
|
|
104972
|
+
modal_copy: modal_copy,
|
|
104973
|
+
authService: authService,
|
|
104974
|
+
customerData: customerData
|
|
104975
|
+
}),
|
|
104976
|
+
isVisible = _useSignUpSignIn.show,
|
|
104977
|
+
isMobile = _useSignUpSignIn.isMobile,
|
|
104978
|
+
editing = _useSignUpSignIn.editing,
|
|
104979
|
+
copy = _useSignUpSignIn.copy,
|
|
104980
|
+
resolvedAuthService = _useSignUpSignIn.authService,
|
|
104981
|
+
authDisplay = _useSignUpSignIn.authDisplay,
|
|
104982
|
+
menuRef = _useSignUpSignIn.menuRef,
|
|
104983
|
+
isAccountMenuOpen = _useSignUpSignIn.isAccountMenuOpen,
|
|
104984
|
+
setIsModalOpen = _useSignUpSignIn.setIsModalOpen,
|
|
104985
|
+
closeModal = _useSignUpSignIn.closeModal,
|
|
104986
|
+
dismissMenus = _useSignUpSignIn.dismissMenus,
|
|
104987
|
+
showMobileModal = _useSignUpSignIn.showMobileModal,
|
|
104988
|
+
greetingName = _useSignUpSignIn.greetingName,
|
|
104989
|
+
resolvedIconName = _useSignUpSignIn.resolvedIconName,
|
|
104990
|
+
resolvedIconColor = _useSignUpSignIn.resolvedIconColor,
|
|
104991
|
+
profilePanelProps = _useSignUpSignIn.profilePanelProps,
|
|
104992
|
+
handleAuthenticatedAccountClick = _useSignUpSignIn.handleAuthenticatedAccountClick;
|
|
104993
|
+
if (!isVisible) return null;
|
|
104994
|
+
return /*#__PURE__*/(0,jsx_runtime_.jsxs)(SignUpSignInRoot, {
|
|
104995
|
+
"data-testid": "signup-signin",
|
|
104996
|
+
children: [/*#__PURE__*/(0,jsx_runtime_.jsx)(DesktopGuestSignupSection, {
|
|
104997
|
+
isMobile: isMobile,
|
|
104998
|
+
showGuestAuth: authDisplay.showGuestAuth,
|
|
104999
|
+
effectiveSignUpTitle: authDisplay.effectiveSignUpTitle,
|
|
105000
|
+
effectiveSignUp: authDisplay.effectiveSignUp,
|
|
105001
|
+
editing: editing,
|
|
105002
|
+
authService: resolvedAuthService,
|
|
105003
|
+
parent$: parent$,
|
|
105004
|
+
resolvedIconName: resolvedIconName,
|
|
105005
|
+
resolvedIconColor: resolvedIconColor
|
|
105006
|
+
}), /*#__PURE__*/(0,jsx_runtime_.jsx)(PrimaryAuthActions, {
|
|
105007
|
+
isAuthenticated: authDisplay.isAuthenticated,
|
|
105008
|
+
menuRef: menuRef,
|
|
105009
|
+
isAccountMenuOpen: isAccountMenuOpen,
|
|
105010
|
+
greetingName: greetingName,
|
|
105011
|
+
accountToggleLabel: authDisplay.accountToggleLabel,
|
|
105012
|
+
resolvedIconName: resolvedIconName,
|
|
105013
|
+
resolvedIconColor: resolvedIconColor,
|
|
105014
|
+
parent$: parent$,
|
|
105015
|
+
onAuthenticatedClick: handleAuthenticatedAccountClick,
|
|
105016
|
+
profilePanelProps: profilePanelProps,
|
|
105017
|
+
isMobile: isMobile,
|
|
105018
|
+
effectiveSignInTitle: authDisplay.effectiveSignInTitle,
|
|
105019
|
+
effectiveSignIn: authDisplay.effectiveSignIn,
|
|
105020
|
+
authService: resolvedAuthService,
|
|
105021
|
+
setIsModalOpen: setIsModalOpen,
|
|
105022
|
+
editing: editing
|
|
105023
|
+
}), /*#__PURE__*/(0,jsx_runtime_.jsx)(MobileAuthOverlay, {
|
|
105024
|
+
show: showMobileModal,
|
|
105025
|
+
onDismiss: dismissMenus,
|
|
105026
|
+
copy: copy,
|
|
105027
|
+
isAuthenticated: authDisplay.isAuthenticated,
|
|
105028
|
+
accountToggleLabel: authDisplay.accountToggleLabel,
|
|
105029
|
+
effectiveSignInTitle: authDisplay.effectiveSignInTitle,
|
|
105030
|
+
profilePanelProps: profilePanelProps,
|
|
105031
|
+
editing: editing,
|
|
105032
|
+
closeModal: closeModal,
|
|
105033
|
+
effectiveSignIn: authDisplay.effectiveSignIn,
|
|
105034
|
+
effectiveSignUp: authDisplay.effectiveSignUp,
|
|
105035
|
+
authService: resolvedAuthService
|
|
105036
|
+
})]
|
|
105037
|
+
});
|
|
105038
|
+
}
|
|
105039
|
+
SignUpSignIn.propTypes = signUpSignInPropTypes;
|
|
105040
|
+
|
|
103624
105041
|
;// ./src/components/header/regions/HeaderAccountRegion.jsx
|
|
103625
105042
|
|
|
103626
105043
|
|
|
@@ -103628,15 +105045,21 @@ SignUpOrSignIn.propTypes = {
|
|
|
103628
105045
|
|
|
103629
105046
|
function HeaderAccountRegion(_ref) {
|
|
103630
105047
|
var data = _ref.data,
|
|
103631
|
-
parent$ = _ref.parent
|
|
105048
|
+
parent$ = _ref.parent$,
|
|
105049
|
+
customerData = _ref.customerData,
|
|
105050
|
+
authService = _ref.authService;
|
|
103632
105051
|
var show = (data === null || data === void 0 ? void 0 : data.show) !== false;
|
|
103633
105052
|
if (!show) return null;
|
|
103634
|
-
return /*#__PURE__*/(0,jsx_runtime_.jsx)(
|
|
105053
|
+
return /*#__PURE__*/(0,jsx_runtime_.jsx)(SignUpSignIn, {
|
|
103635
105054
|
show: show,
|
|
103636
105055
|
icon: data === null || data === void 0 ? void 0 : data.icon,
|
|
103637
105056
|
icon_color: data === null || data === void 0 ? void 0 : data.icon_color,
|
|
103638
105057
|
sign_up: data === null || data === void 0 ? void 0 : data.sign_up,
|
|
103639
105058
|
sign_in: data === null || data === void 0 ? void 0 : data.sign_in,
|
|
105059
|
+
signed_in: data === null || data === void 0 ? void 0 : data.signed_in,
|
|
105060
|
+
profile_utility_links: data === null || data === void 0 ? void 0 : data.profile_utility_links,
|
|
105061
|
+
customerData: customerData,
|
|
105062
|
+
authService: authService,
|
|
103640
105063
|
parent$: parent$
|
|
103641
105064
|
});
|
|
103642
105065
|
}
|
|
@@ -103652,15 +105075,22 @@ HeaderAccountRegion.propTypes = {
|
|
|
103652
105075
|
sign_in: external_prop_types_default().shape({
|
|
103653
105076
|
title: (external_prop_types_default()).string,
|
|
103654
105077
|
url: (external_prop_types_default()).string
|
|
103655
|
-
})
|
|
105078
|
+
}),
|
|
105079
|
+
signed_in: external_prop_types_default().shape({
|
|
105080
|
+
title: (external_prop_types_default()).string,
|
|
105081
|
+
url: (external_prop_types_default()).string
|
|
105082
|
+
}),
|
|
105083
|
+
profile_utility_links: (external_prop_types_default()).object
|
|
103656
105084
|
}),
|
|
105085
|
+
customerData: (external_prop_types_default()).object,
|
|
105086
|
+
authService: (external_prop_types_default()).object,
|
|
103657
105087
|
parent$: external_prop_types_default().shape({
|
|
103658
105088
|
icon: (external_prop_types_default()).object,
|
|
103659
105089
|
icon_color: (external_prop_types_default()).object,
|
|
103660
105090
|
sign_up: (external_prop_types_default()).object,
|
|
103661
105091
|
sign_up_url: (external_prop_types_default()).object,
|
|
103662
105092
|
sign_in: (external_prop_types_default()).object,
|
|
103663
|
-
|
|
105093
|
+
signed_in: (external_prop_types_default()).object
|
|
103664
105094
|
})
|
|
103665
105095
|
};
|
|
103666
105096
|
;// ./src/components/cart/Cart.styled.js
|
|
@@ -103879,7 +105309,7 @@ HeaderCartRegion.defaultProps = {
|
|
|
103879
105309
|
var Close = __webpack_require__(9781);
|
|
103880
105310
|
;// ./src/utils/parseIconAsset.js
|
|
103881
105311
|
function parseIconAsset_typeof(o) { "@babel/helpers - typeof"; return parseIconAsset_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; }, parseIconAsset_typeof(o); }
|
|
103882
|
-
function
|
|
105312
|
+
function parseIconAsset_createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = parseIconAsset_unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
|
|
103883
105313
|
function parseIconAsset_unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return parseIconAsset_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) ? parseIconAsset_arrayLikeToArray(r, a) : void 0; } }
|
|
103884
105314
|
function parseIconAsset_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; }
|
|
103885
105315
|
/**
|
|
@@ -103908,7 +105338,7 @@ function getDirectUrl(value) {
|
|
|
103908
105338
|
return normalizeUrlString((value === null || value === void 0 ? void 0 : value.url) || (value === null || value === void 0 ? void 0 : value.src) || (value === null || value === void 0 || (_value$selected = value.selected) === null || _value$selected === void 0 ? void 0 : _value$selected.url) || (value === null || value === void 0 || (_value$files = value.files) === null || _value$files === void 0 || (_value$files = _value$files.transformBaseUrl) === null || _value$files === void 0 ? void 0 : _value$files.url) || (value === null || value === void 0 || (_value$files2 = value.files) === null || _value$files2 === void 0 || (_value$files2 = _value$files2.thumbnail) === null || _value$files2 === void 0 ? void 0 : _value$files2.url));
|
|
103909
105339
|
}
|
|
103910
105340
|
function findUrlInValues(values, depth) {
|
|
103911
|
-
var _iterator =
|
|
105341
|
+
var _iterator = parseIconAsset_createForOfIteratorHelper(values),
|
|
103912
105342
|
_step;
|
|
103913
105343
|
try {
|
|
103914
105344
|
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
@@ -103963,7 +105393,7 @@ function getFieldValueFromGroup(source, keys) {
|
|
|
103963
105393
|
var expandedKeys = keys.flatMap(function (key) {
|
|
103964
105394
|
return [key, "".concat(key, "__0")];
|
|
103965
105395
|
});
|
|
103966
|
-
var _iterator2 =
|
|
105396
|
+
var _iterator2 = parseIconAsset_createForOfIteratorHelper(expandedKeys),
|
|
103967
105397
|
_step2;
|
|
103968
105398
|
try {
|
|
103969
105399
|
for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
|
|
@@ -108118,13 +109548,6 @@ var isServer = typeof window === "undefined";
|
|
|
108118
109548
|
|
|
108119
109549
|
/** Stable reference — default `customFields = {}` in params creates a new object every render. */
|
|
108120
109550
|
var EMPTY_CUSTOM_FIELDS = {};
|
|
108121
|
-
function pageNameFromPathname(pathname) {
|
|
108122
|
-
var parts = String(pathname || "").split("/").filter(Boolean);
|
|
108123
|
-
if (parts.length <= 2) {
|
|
108124
|
-
return "";
|
|
108125
|
-
}
|
|
108126
|
-
return parts.slice(2).join("/");
|
|
108127
|
-
}
|
|
108128
109551
|
var GTMTracker = function GTMTracker(_ref) {
|
|
108129
109552
|
var componentName = _ref.componentName,
|
|
108130
109553
|
impressionEvent = _ref.impressionEvent,
|
|
@@ -108137,6 +109560,8 @@ var GTMTracker = function GTMTracker(_ref) {
|
|
|
108137
109560
|
clickSelector = _ref$clickSelector === void 0 ? "a" : _ref$clickSelector,
|
|
108138
109561
|
_ref$clickEventAction = _ref.clickEventAction,
|
|
108139
109562
|
clickEventAction = _ref$clickEventAction === void 0 ? "click" : _ref$clickEventAction,
|
|
109563
|
+
_ref$extractClickData = _ref.extractClickData,
|
|
109564
|
+
extractClickData = _ref$extractClickData === void 0 ? false : _ref$extractClickData,
|
|
108140
109565
|
customFields = _ref.customFields,
|
|
108141
109566
|
children = _ref.children;
|
|
108142
109567
|
// On the server, just render children — tracking is client-only.
|
|
@@ -108155,6 +109580,7 @@ var GTMTracker = function GTMTracker(_ref) {
|
|
|
108155
109580
|
clickTriggerType: clickTriggerType,
|
|
108156
109581
|
clickSelector: clickSelector,
|
|
108157
109582
|
clickEventAction: clickEventAction,
|
|
109583
|
+
extractClickData: extractClickData,
|
|
108158
109584
|
customFields: customFields !== null && customFields !== void 0 ? customFields : EMPTY_CUSTOM_FIELDS,
|
|
108159
109585
|
children: children
|
|
108160
109586
|
});
|
|
@@ -108171,11 +109597,12 @@ function GTMTrackerClient(_ref2) {
|
|
|
108171
109597
|
clickTriggerType = _ref2.clickTriggerType,
|
|
108172
109598
|
clickSelector = _ref2.clickSelector,
|
|
108173
109599
|
clickEventAction = _ref2.clickEventAction,
|
|
109600
|
+
extractClickData = _ref2.extractClickData,
|
|
108174
109601
|
customFields = _ref2.customFields,
|
|
108175
109602
|
children = _ref2.children;
|
|
108176
109603
|
var componentRef = (0,external_react_.useRef)(null);
|
|
108177
109604
|
var impressionTrackedRef = (0,external_react_.useRef)(false);
|
|
108178
|
-
var
|
|
109605
|
+
var pageUrl = typeof window !== "undefined" ? window.location.href : "";
|
|
108179
109606
|
(0,external_react_.useEffect)(function () {
|
|
108180
109607
|
if (!impressionEvent) return;
|
|
108181
109608
|
var observer = new IntersectionObserver(function (entries) {
|
|
@@ -108186,7 +109613,7 @@ function GTMTrackerClient(_ref2) {
|
|
|
108186
109613
|
component_name: componentName,
|
|
108187
109614
|
event: impressionEvent,
|
|
108188
109615
|
event_action: "view",
|
|
108189
|
-
|
|
109616
|
+
page_url: pageUrl
|
|
108190
109617
|
}, impressionElement && {
|
|
108191
109618
|
element: impressionElement
|
|
108192
109619
|
}), impressionTriggerType && {
|
|
@@ -108206,7 +109633,7 @@ function GTMTrackerClient(_ref2) {
|
|
|
108206
109633
|
observer.unobserve(el);
|
|
108207
109634
|
}
|
|
108208
109635
|
};
|
|
108209
|
-
}, [componentName, impressionEvent, customFields,
|
|
109636
|
+
}, [componentName, impressionEvent, customFields, pageUrl, impressionElement, impressionTriggerType]);
|
|
108210
109637
|
(0,external_react_.useEffect)(function () {
|
|
108211
109638
|
if (!clickEvent) return;
|
|
108212
109639
|
var el = componentRef.current;
|
|
@@ -108214,23 +109641,28 @@ function GTMTrackerClient(_ref2) {
|
|
|
108214
109641
|
var handleClick = function handleClick(e) {
|
|
108215
109642
|
var target = e.target.closest(clickSelector);
|
|
108216
109643
|
if (target) {
|
|
108217
|
-
|
|
109644
|
+
var _target$textContent;
|
|
109645
|
+
var dynamicData = extractClickData ? {
|
|
109646
|
+
text: (_target$textContent = target.textContent) === null || _target$textContent === void 0 ? void 0 : _target$textContent.trim(),
|
|
109647
|
+
url: target.href
|
|
109648
|
+
} : {};
|
|
109649
|
+
trackVisualBuilderEvent(GTMTracker_objectSpread(GTMTracker_objectSpread(GTMTracker_objectSpread(GTMTracker_objectSpread({
|
|
108218
109650
|
component_name: componentName,
|
|
108219
109651
|
event: clickEvent,
|
|
108220
109652
|
event_action: clickEventAction,
|
|
108221
|
-
|
|
109653
|
+
page_url: pageUrl
|
|
108222
109654
|
}, clickElement && {
|
|
108223
109655
|
element: clickElement
|
|
108224
109656
|
}), clickTriggerType && {
|
|
108225
109657
|
trigger_type: clickTriggerType
|
|
108226
|
-
}), customFields));
|
|
109658
|
+
}), customFields), dynamicData));
|
|
108227
109659
|
}
|
|
108228
109660
|
};
|
|
108229
109661
|
el.addEventListener("click", handleClick, true);
|
|
108230
109662
|
return function () {
|
|
108231
109663
|
return el.removeEventListener("click", handleClick, true);
|
|
108232
109664
|
};
|
|
108233
|
-
}, [componentName, clickEvent, clickElement, clickTriggerType, clickSelector, clickEventAction, customFields,
|
|
109665
|
+
}, [componentName, clickEvent, clickElement, clickTriggerType, clickSelector, clickEventAction, extractClickData, customFields, pageUrl]);
|
|
108234
109666
|
return /*#__PURE__*/(0,jsx_runtime_.jsx)(GTMTrackerRoot, {
|
|
108235
109667
|
ref: componentRef,
|
|
108236
109668
|
children: children
|
|
@@ -108246,6 +109678,7 @@ GTMTracker.propTypes = {
|
|
|
108246
109678
|
clickTriggerType: (external_prop_types_default()).string,
|
|
108247
109679
|
clickSelector: (external_prop_types_default()).string,
|
|
108248
109680
|
clickEventAction: (external_prop_types_default()).string,
|
|
109681
|
+
extractClickData: (external_prop_types_default()).bool,
|
|
108249
109682
|
customFields: (external_prop_types_default()).object,
|
|
108250
109683
|
children: (external_prop_types_default()).node.isRequired
|
|
108251
109684
|
};
|
|
@@ -108525,22 +109958,6 @@ var TopRibbon = function TopRibbon(_ref) {
|
|
|
108525
109958
|
return null;
|
|
108526
109959
|
}
|
|
108527
109960
|
var editing = isEditingMode();
|
|
108528
|
-
|
|
108529
|
-
/**
|
|
108530
|
-
* Fires a GTM dataLayer event when a link is clicked.
|
|
108531
|
-
* Does NOT call preventDefault — native target="_blank" behaviour is preserved.
|
|
108532
|
-
* SSR-safe: guarded behind typeof window check.
|
|
108533
|
-
*
|
|
108534
|
-
* @param {Object} item - The navigation item that was clicked
|
|
108535
|
-
*/
|
|
108536
|
-
var handleClick = function handleClick(item) {
|
|
108537
|
-
if (typeof window === "undefined" || !Array.isArray(window.dataLayer)) return;
|
|
108538
|
-
window.dataLayer.push(TopRibbon_objectSpread({
|
|
108539
|
-
event: "top_ribbon_click",
|
|
108540
|
-
link_text: item.label,
|
|
108541
|
-
link_url: item.url
|
|
108542
|
-
}, item.gtmEvent));
|
|
108543
|
-
};
|
|
108544
109961
|
return /*#__PURE__*/(0,jsx_runtime_.jsx)(StyledTopRibbon, {
|
|
108545
109962
|
className: className,
|
|
108546
109963
|
"data-testid": dataTestId,
|
|
@@ -108572,9 +109989,6 @@ var TopRibbon = function TopRibbon(_ref) {
|
|
|
108572
109989
|
href: linkHref,
|
|
108573
109990
|
target: "_blank",
|
|
108574
109991
|
rel: "noopener noreferrer",
|
|
108575
|
-
onClick: function onClick() {
|
|
108576
|
-
return handleClick(item);
|
|
108577
|
-
},
|
|
108578
109992
|
"aria-label": linkAriaLabel,
|
|
108579
109993
|
"data-testid": linkTestId,
|
|
108580
109994
|
children: /*#__PURE__*/(0,jsx_runtime_.jsx)("span", TopRibbon_objectSpread(TopRibbon_objectSpread({}, editing ? (_item$$ = item.$) === null || _item$$ === void 0 ? void 0 : _item$$.label : null), {}, {
|
|
@@ -111060,6 +112474,135 @@ MarketSelector.propTypes = {
|
|
|
111060
112474
|
$: (external_prop_types_default()).object
|
|
111061
112475
|
})
|
|
111062
112476
|
};
|
|
112477
|
+
;// ./src/components/signup-signin/SignUpSignIn.cms.js
|
|
112478
|
+
function SignUpSignIn_cms_toConsumableArray(r) { return SignUpSignIn_cms_arrayWithoutHoles(r) || SignUpSignIn_cms_iterableToArray(r) || SignUpSignIn_cms_unsupportedIterableToArray(r) || SignUpSignIn_cms_nonIterableSpread(); }
|
|
112479
|
+
function SignUpSignIn_cms_nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
112480
|
+
function SignUpSignIn_cms_unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return SignUpSignIn_cms_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) ? SignUpSignIn_cms_arrayLikeToArray(r, a) : void 0; } }
|
|
112481
|
+
function SignUpSignIn_cms_iterableToArray(r) { if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); }
|
|
112482
|
+
function SignUpSignIn_cms_arrayWithoutHoles(r) { if (Array.isArray(r)) return SignUpSignIn_cms_arrayLikeToArray(r); }
|
|
112483
|
+
function SignUpSignIn_cms_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; }
|
|
112484
|
+
|
|
112485
|
+
var SIGNED_IN_LABEL_KEYS = ["signed_in", "signed_in_label", "account_label", "my_account_label"];
|
|
112486
|
+
var SIGNED_IN_URL_KEYS = ["signed_in_url", "account_url", "my_account_url"];
|
|
112487
|
+
function firstDefined() {
|
|
112488
|
+
for (var _len = arguments.length, values = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
112489
|
+
values[_key] = arguments[_key];
|
|
112490
|
+
}
|
|
112491
|
+
for (var _i = 0, _values = values; _i < _values.length; _i++) {
|
|
112492
|
+
var value = _values[_i];
|
|
112493
|
+
if (value !== undefined && value !== null) return value;
|
|
112494
|
+
}
|
|
112495
|
+
return undefined;
|
|
112496
|
+
}
|
|
112497
|
+
function normalizeShowFlag(value) {
|
|
112498
|
+
var fallback = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
|
|
112499
|
+
if (value === undefined || value === null) return fallback;
|
|
112500
|
+
if (typeof value === "boolean") return value;
|
|
112501
|
+
var normalized = String(value).trim().toLowerCase();
|
|
112502
|
+
if (normalized === "false" || normalized === "0" || normalized === "no") {
|
|
112503
|
+
return false;
|
|
112504
|
+
}
|
|
112505
|
+
if (normalized === "true" || normalized === "1" || normalized === "yes") {
|
|
112506
|
+
return true;
|
|
112507
|
+
}
|
|
112508
|
+
return Boolean(value);
|
|
112509
|
+
}
|
|
112510
|
+
function pickAuthTextField(authData, fieldKey) {
|
|
112511
|
+
var value = authData === null || authData === void 0 ? void 0 : authData[fieldKey];
|
|
112512
|
+
if (typeof value !== "string") return undefined;
|
|
112513
|
+
var trimmed = value.trim();
|
|
112514
|
+
return trimmed || undefined;
|
|
112515
|
+
}
|
|
112516
|
+
function pickAuthTextFieldFromKeys(authData, fieldKeys, legacyData) {
|
|
112517
|
+
var legacyKeys = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : [];
|
|
112518
|
+
var cmsValues = fieldKeys.map(function (key) {
|
|
112519
|
+
return pickAuthTextField(authData, key);
|
|
112520
|
+
});
|
|
112521
|
+
var legacyValues = legacyKeys.map(function (key) {
|
|
112522
|
+
return legacyData === null || legacyData === void 0 ? void 0 : legacyData[key];
|
|
112523
|
+
});
|
|
112524
|
+
return firstDefined.apply(void 0, SignUpSignIn_cms_toConsumableArray(cmsValues).concat(SignUpSignIn_cms_toConsumableArray(legacyValues)));
|
|
112525
|
+
}
|
|
112526
|
+
function normalizeUtilityLinksEntries(utilityLinksRaw) {
|
|
112527
|
+
if (Array.isArray(utilityLinksRaw)) return utilityLinksRaw;
|
|
112528
|
+
if (utilityLinksRaw) return [utilityLinksRaw];
|
|
112529
|
+
return [];
|
|
112530
|
+
}
|
|
112531
|
+
function pickUtilityLinksEntry(utilityLinksEntries) {
|
|
112532
|
+
return utilityLinksEntries.find(function (entry) {
|
|
112533
|
+
return entry === null || entry === void 0 ? void 0 : entry.sign_up_sign_in_component;
|
|
112534
|
+
}) || utilityLinksEntries[0] || null;
|
|
112535
|
+
}
|
|
112536
|
+
function buildAccountData(_ref) {
|
|
112537
|
+
var _firstDefined, _firstDefined2, _firstDefined3, _pickAuthTextFieldFro, _pickAuthTextFieldFro2;
|
|
112538
|
+
var utilityAuthData = _ref.utilityAuthData,
|
|
112539
|
+
legacyAccountData = _ref.legacyAccountData;
|
|
112540
|
+
return {
|
|
112541
|
+
show: normalizeShowFlag(firstDefined(utilityAuthData === null || utilityAuthData === void 0 ? void 0 : utilityAuthData.show, legacyAccountData === null || legacyAccountData === void 0 ? void 0 : legacyAccountData.show), true),
|
|
112542
|
+
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_ICON,
|
|
112543
|
+
icon_color: 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),
|
|
112544
|
+
sign_up: {
|
|
112545
|
+
title: (_firstDefined2 = firstDefined(pickAuthTextField(utilityAuthData, "sign_up"), legacyAccountData === null || legacyAccountData === void 0 ? void 0 : legacyAccountData.sign_up_label)) !== null && _firstDefined2 !== void 0 ? _firstDefined2 : DEFAULT_SIGN_UP.title,
|
|
112546
|
+
url: DEFAULT_SIGN_UP.url
|
|
112547
|
+
},
|
|
112548
|
+
sign_in: {
|
|
112549
|
+
title: (_firstDefined3 = firstDefined(pickAuthTextField(utilityAuthData, "sign_in"), legacyAccountData === null || legacyAccountData === void 0 ? void 0 : legacyAccountData.sign_in_label)) !== null && _firstDefined3 !== void 0 ? _firstDefined3 : DEFAULT_SIGN_IN.title,
|
|
112550
|
+
url: DEFAULT_SIGN_IN.url
|
|
112551
|
+
},
|
|
112552
|
+
signed_in: {
|
|
112553
|
+
title: (_pickAuthTextFieldFro = pickAuthTextFieldFromKeys(utilityAuthData, SIGNED_IN_LABEL_KEYS, legacyAccountData, ["signed_in_label", "account_label"])) !== null && _pickAuthTextFieldFro !== void 0 ? _pickAuthTextFieldFro : DEFAULT_SIGNED_IN.title,
|
|
112554
|
+
url: (_pickAuthTextFieldFro2 = pickAuthTextFieldFromKeys(utilityAuthData, SIGNED_IN_URL_KEYS, legacyAccountData, ["signed_in_url", "account_url"])) !== null && _pickAuthTextFieldFro2 !== void 0 ? _pickAuthTextFieldFro2 : DEFAULT_SIGNED_IN.url
|
|
112555
|
+
},
|
|
112556
|
+
profile_utility_links: (utilityAuthData === null || utilityAuthData === void 0 ? void 0 : utilityAuthData.profile_utility_links) || (utilityAuthData === null || utilityAuthData === void 0 ? void 0 : utilityAuthData.profileUtilityLinks) || undefined
|
|
112557
|
+
};
|
|
112558
|
+
}
|
|
112559
|
+
function buildAccountParentTags(_ref2) {
|
|
112560
|
+
var _utilityLinksEntry$$, _utilityLinksEntry$$2, _legacyAccountData$$, _legacyAccountData$$2, _legacyAccountData$$3;
|
|
112561
|
+
var utilityAuthData = _ref2.utilityAuthData,
|
|
112562
|
+
utilityLinksEntry = _ref2.utilityLinksEntry,
|
|
112563
|
+
legacyAccountData = _ref2.legacyAccountData;
|
|
112564
|
+
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);
|
|
112565
|
+
var pickTag = function pickTag(key) {
|
|
112566
|
+
var _utilityAuthData$$;
|
|
112567
|
+
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]);
|
|
112568
|
+
};
|
|
112569
|
+
var pickTagFromKeys = function pickTagFromKeys() {
|
|
112570
|
+
for (var _len2 = arguments.length, keys = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
|
|
112571
|
+
keys[_key2] = arguments[_key2];
|
|
112572
|
+
}
|
|
112573
|
+
for (var _i2 = 0, _keys = keys; _i2 < _keys.length; _i2++) {
|
|
112574
|
+
var key = _keys[_i2];
|
|
112575
|
+
var tag = pickTag(key);
|
|
112576
|
+
if (tag) return tag;
|
|
112577
|
+
}
|
|
112578
|
+
return undefined;
|
|
112579
|
+
};
|
|
112580
|
+
return {
|
|
112581
|
+
icon: pickTag("icon") || (legacyAccountData === null || legacyAccountData === void 0 || (_legacyAccountData$$ = legacyAccountData.$) === null || _legacyAccountData$$ === void 0 ? void 0 : _legacyAccountData$$.icon),
|
|
112582
|
+
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),
|
|
112583
|
+
sign_up: pickTag("sign_up"),
|
|
112584
|
+
sign_up_url: pickTag("sign_up_url"),
|
|
112585
|
+
sign_in: pickTag("sign_in"),
|
|
112586
|
+
signed_in: pickTagFromKeys("signed_in", "signed_in_label", "account_label", "my_account_label")
|
|
112587
|
+
};
|
|
112588
|
+
}
|
|
112589
|
+
function resolveHeaderAuthFromEntry(headerEntry) {
|
|
112590
|
+
var utilityLinksEntries = normalizeUtilityLinksEntries(headerEntry === null || headerEntry === void 0 ? void 0 : headerEntry.utility_links);
|
|
112591
|
+
var utilityLinksEntry = pickUtilityLinksEntry(utilityLinksEntries);
|
|
112592
|
+
var utilityAuthData = utilityLinksEntry === null || utilityLinksEntry === void 0 ? void 0 : utilityLinksEntry.sign_up_sign_in_component;
|
|
112593
|
+
var legacyAccountData = headerEntry === null || headerEntry === void 0 ? void 0 : headerEntry.account;
|
|
112594
|
+
return {
|
|
112595
|
+
accountData: buildAccountData({
|
|
112596
|
+
utilityAuthData: utilityAuthData,
|
|
112597
|
+
legacyAccountData: legacyAccountData
|
|
112598
|
+
}),
|
|
112599
|
+
accountParentTags: buildAccountParentTags({
|
|
112600
|
+
utilityAuthData: utilityAuthData,
|
|
112601
|
+
utilityLinksEntry: utilityLinksEntry,
|
|
112602
|
+
legacyAccountData: legacyAccountData
|
|
112603
|
+
})
|
|
112604
|
+
};
|
|
112605
|
+
}
|
|
111063
112606
|
;// ./src/components/header/HeaderView.jsx
|
|
111064
112607
|
function HeaderView_typeof(o) { "@babel/helpers - typeof"; return HeaderView_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; }, HeaderView_typeof(o); }
|
|
111065
112608
|
function HeaderView_slicedToArray(r, e) { return HeaderView_arrayWithHoles(r) || HeaderView_iterableToArrayLimit(r, e) || HeaderView_unsupportedIterableToArray(r, e) || HeaderView_nonIterableRest(); }
|
|
@@ -111090,6 +112633,7 @@ function HeaderView_toPrimitive(t, r) { if ("object" != HeaderView_typeof(t) ||
|
|
|
111090
112633
|
|
|
111091
112634
|
|
|
111092
112635
|
|
|
112636
|
+
|
|
111093
112637
|
var DEFAULT_LOGO = {
|
|
111094
112638
|
wordmark: "NU SKIN",
|
|
111095
112639
|
home_href: "/",
|
|
@@ -111106,19 +112650,6 @@ var DEFAULT_MARKET_SELECTOR = {
|
|
|
111106
112650
|
cancel_text: "Cancel",
|
|
111107
112651
|
control_label: DEFAULT_LOCALE.control_label
|
|
111108
112652
|
};
|
|
111109
|
-
var DEFAULT_ACCOUNT = {
|
|
111110
|
-
show: true,
|
|
111111
|
-
icon: "userOutline",
|
|
111112
|
-
icon_color: undefined,
|
|
111113
|
-
sign_up: {
|
|
111114
|
-
title: "Sign Up",
|
|
111115
|
-
url: ""
|
|
111116
|
-
},
|
|
111117
|
-
sign_in: {
|
|
111118
|
-
title: "Sign In",
|
|
111119
|
-
url: ""
|
|
111120
|
-
}
|
|
111121
|
-
};
|
|
111122
112653
|
var DEFAULT_LOYALTY = {
|
|
111123
112654
|
label: "Nu Skin Rewards",
|
|
111124
112655
|
url: "/rewards",
|
|
@@ -111129,17 +112660,7 @@ var DEFAULT_CART = {
|
|
|
111129
112660
|
aria_label: "Shopping cart",
|
|
111130
112661
|
count: 0
|
|
111131
112662
|
};
|
|
111132
|
-
function
|
|
111133
|
-
for (var _len = arguments.length, values = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
111134
|
-
values[_key] = arguments[_key];
|
|
111135
|
-
}
|
|
111136
|
-
for (var _i = 0, _values = values; _i < _values.length; _i++) {
|
|
111137
|
-
var value = _values[_i];
|
|
111138
|
-
if (value !== undefined && value !== null) return value;
|
|
111139
|
-
}
|
|
111140
|
-
return undefined;
|
|
111141
|
-
}
|
|
111142
|
-
function normalizeShowFlag(value) {
|
|
112663
|
+
function HeaderView_normalizeShowFlag(value) {
|
|
111143
112664
|
var fallback = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
|
|
111144
112665
|
if (value === undefined || value === null) return fallback;
|
|
111145
112666
|
if (typeof value === "boolean") return value;
|
|
@@ -111152,62 +112673,9 @@ function normalizeShowFlag(value) {
|
|
|
111152
112673
|
}
|
|
111153
112674
|
return Boolean(value);
|
|
111154
112675
|
}
|
|
111155
|
-
function
|
|
111156
|
-
|
|
111157
|
-
|
|
111158
|
-
return [];
|
|
111159
|
-
}
|
|
111160
|
-
function pickUtilityLinksEntry(utilityLinksEntries) {
|
|
111161
|
-
return utilityLinksEntries.find(function (entry) {
|
|
111162
|
-
return entry === null || entry === void 0 ? void 0 : entry.sign_up_sign_in_component;
|
|
111163
|
-
}) || utilityLinksEntries[0] || null;
|
|
111164
|
-
}
|
|
111165
|
-
function pickAuthTextField(authData, fieldKey) {
|
|
111166
|
-
var value = authData === null || authData === void 0 ? void 0 : authData[fieldKey];
|
|
111167
|
-
if (typeof value !== "string") return undefined;
|
|
111168
|
-
var trimmed = value.trim();
|
|
111169
|
-
return trimmed || undefined;
|
|
111170
|
-
}
|
|
111171
|
-
function buildAccountData(_ref) {
|
|
111172
|
-
var _firstDefined, _firstDefined2, _firstDefined3, _firstDefined4, _firstDefined5, _firstDefined6;
|
|
111173
|
-
var utilityAuthData = _ref.utilityAuthData,
|
|
111174
|
-
legacyAccountData = _ref.legacyAccountData;
|
|
111175
|
-
return {
|
|
111176
|
-
show: normalizeShowFlag(firstDefined(utilityAuthData === null || utilityAuthData === void 0 ? void 0 : utilityAuthData.show, legacyAccountData === null || legacyAccountData === void 0 ? void 0 : legacyAccountData.show), DEFAULT_ACCOUNT.show),
|
|
111177
|
-
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,
|
|
111178
|
-
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,
|
|
111179
|
-
sign_up: {
|
|
111180
|
-
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,
|
|
111181
|
-
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
|
|
111182
|
-
},
|
|
111183
|
-
sign_in: {
|
|
111184
|
-
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,
|
|
111185
|
-
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
|
|
111186
|
-
}
|
|
111187
|
-
};
|
|
111188
|
-
}
|
|
111189
|
-
function buildAccountParentTags(_ref2) {
|
|
111190
|
-
var _utilityLinksEntry$$, _utilityLinksEntry$$2, _legacyAccountData$$, _legacyAccountData$$2, _legacyAccountData$$3;
|
|
111191
|
-
var utilityAuthData = _ref2.utilityAuthData,
|
|
111192
|
-
utilityLinksEntry = _ref2.utilityLinksEntry,
|
|
111193
|
-
legacyAccountData = _ref2.legacyAccountData;
|
|
111194
|
-
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);
|
|
111195
|
-
var pickTag = function pickTag(key) {
|
|
111196
|
-
var _utilityAuthData$$;
|
|
111197
|
-
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]);
|
|
111198
|
-
};
|
|
111199
|
-
return {
|
|
111200
|
-
icon: pickTag("icon") || (legacyAccountData === null || legacyAccountData === void 0 || (_legacyAccountData$$ = legacyAccountData.$) === null || _legacyAccountData$$ === void 0 ? void 0 : _legacyAccountData$$.icon),
|
|
111201
|
-
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),
|
|
111202
|
-
sign_up: pickTag("sign_up"),
|
|
111203
|
-
sign_up_url: pickTag("sign_up_url"),
|
|
111204
|
-
sign_in: pickTag("sign_in"),
|
|
111205
|
-
sign_in_url: pickTag("sign_in_url")
|
|
111206
|
-
};
|
|
111207
|
-
}
|
|
111208
|
-
function LoyaltyComponent(_ref3) {
|
|
111209
|
-
var data = _ref3.data;
|
|
111210
|
-
var show = normalizeShowFlag(data === null || data === void 0 ? void 0 : data.show, true);
|
|
112676
|
+
function LoyaltyComponent(_ref) {
|
|
112677
|
+
var data = _ref.data;
|
|
112678
|
+
var show = HeaderView_normalizeShowFlag(data === null || data === void 0 ? void 0 : data.show, true);
|
|
111211
112679
|
if (!show) return null;
|
|
111212
112680
|
return withTracking(/*#__PURE__*/(0,jsx_runtime_.jsx)(HeaderLoyaltyRegion, {
|
|
111213
112681
|
data: data
|
|
@@ -111218,14 +112686,30 @@ function LoyaltyComponent(_ref3) {
|
|
|
111218
112686
|
LoyaltyComponent.propTypes = {
|
|
111219
112687
|
data: (external_prop_types_default()).object
|
|
111220
112688
|
};
|
|
112689
|
+
function TopRibbonComponent(_ref2) {
|
|
112690
|
+
var _data$top_ribbon_aria;
|
|
112691
|
+
var data = _ref2.data,
|
|
112692
|
+
_ref2$parentTags = _ref2.parentTags,
|
|
112693
|
+
parentTags = _ref2$parentTags === void 0 ? {} : _ref2$parentTags;
|
|
112694
|
+
if (!(data !== null && data !== void 0 && data.show_top_ribbon)) return null;
|
|
112695
|
+
return withTracking(/*#__PURE__*/(0,jsx_runtime_.jsx)("div", HeaderView_objectSpread(HeaderView_objectSpread(HeaderView_objectSpread({}, (parentTags === null || parentTags === void 0 ? void 0 : parentTags.top_ribbon) || {}), (parentTags === null || parentTags === void 0 ? void 0 : parentTags.top_ribbon__parent) || {}), {}, {
|
|
112696
|
+
children: /*#__PURE__*/(0,jsx_runtime_.jsx)(top_ribbon_TopRibbon, {
|
|
112697
|
+
links: [data],
|
|
112698
|
+
ariaLabel: (_data$top_ribbon_aria = data.top_ribbon_aria_label) !== null && _data$top_ribbon_aria !== void 0 ? _data$top_ribbon_aria : "Top Ribbon",
|
|
112699
|
+
dataTestId: "header-top-ribbon"
|
|
112700
|
+
})
|
|
112701
|
+
})), {
|
|
112702
|
+
componentType: "topRibbon"
|
|
112703
|
+
});
|
|
112704
|
+
}
|
|
111221
112705
|
function LogoComponent(props) {
|
|
111222
112706
|
return withTracking(/*#__PURE__*/(0,jsx_runtime_.jsx)(Brand, HeaderView_objectSpread({}, props)), {
|
|
111223
112707
|
componentType: "logo"
|
|
111224
112708
|
});
|
|
111225
112709
|
}
|
|
111226
|
-
function CartComponent(
|
|
111227
|
-
var data =
|
|
111228
|
-
parent$ =
|
|
112710
|
+
function CartComponent(_ref3) {
|
|
112711
|
+
var data = _ref3.data,
|
|
112712
|
+
parent$ = _ref3.parent$;
|
|
111229
112713
|
return withTracking(/*#__PURE__*/(0,jsx_runtime_.jsx)(HeaderCartRegion, {
|
|
111230
112714
|
data: data,
|
|
111231
112715
|
parent$: parent$
|
|
@@ -111237,37 +112721,28 @@ CartComponent.propTypes = {
|
|
|
111237
112721
|
data: (external_prop_types_default()).object,
|
|
111238
112722
|
parent$: (external_prop_types_default()).object
|
|
111239
112723
|
};
|
|
111240
|
-
function HeaderView(
|
|
111241
|
-
var _headerEntry$logo, _headerEntry$locale_s, _utilityLinksEntry$lo, _utilityLinksEntry$lo2, _headerEntry$cart, _storefrontParams$car, _headerEntry$$, _headerEntry$top_ribb, _headerEntry$market_s, _headerEntry$translat, _headerEntry$translat2,
|
|
111242
|
-
var country =
|
|
111243
|
-
language =
|
|
111244
|
-
locale =
|
|
111245
|
-
headerEntry =
|
|
111246
|
-
searchConfig =
|
|
111247
|
-
storefrontParams =
|
|
112724
|
+
function HeaderView(_ref4) {
|
|
112725
|
+
var _headerEntry$logo, _headerEntry$locale_s, _utilityLinksEntry$lo, _utilityLinksEntry$lo2, _headerEntry$cart, _storefrontParams$car, _headerEntry$$, _headerEntry$top_ribb, _headerEntry$market_s, _headerEntry$translat, _headerEntry$translat2, _headerEntry$$2, _ref5, _headerEntry$locale, _headerEntry$$3, _headerEntry$$4;
|
|
112726
|
+
var country = _ref4.country,
|
|
112727
|
+
language = _ref4.language,
|
|
112728
|
+
locale = _ref4.locale,
|
|
112729
|
+
headerEntry = _ref4.headerEntry,
|
|
112730
|
+
searchConfig = _ref4.searchConfig,
|
|
112731
|
+
storefrontParams = _ref4.storefrontParams;
|
|
111248
112732
|
var _useState = (0,external_react_.useState)(false),
|
|
111249
112733
|
_useState2 = HeaderView_slicedToArray(_useState, 2),
|
|
111250
112734
|
isMobileMenuOpen = _useState2[0],
|
|
111251
112735
|
setIsMobileMenuOpen = _useState2[1];
|
|
111252
112736
|
var mobileMarketTriggerMountRef = (0,external_react_.useRef)(null);
|
|
111253
112737
|
var editing = isEditingMode();
|
|
111254
|
-
var
|
|
111255
|
-
var utilityLinksEntries = normalizeUtilityLinksEntries(utilityLinksRaw);
|
|
112738
|
+
var utilityLinksEntries = normalizeUtilityLinksEntries(headerEntry === null || headerEntry === void 0 ? void 0 : headerEntry.utility_links);
|
|
111256
112739
|
var utilityLinksEntry = pickUtilityLinksEntry(utilityLinksEntries);
|
|
111257
112740
|
var logoData = parseLogoData((_headerEntry$logo = headerEntry === null || headerEntry === void 0 ? void 0 : headerEntry.logo) !== null && _headerEntry$logo !== void 0 ? _headerEntry$logo : DEFAULT_LOGO);
|
|
111258
112741
|
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;
|
|
111259
112742
|
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;
|
|
111260
|
-
var
|
|
111261
|
-
|
|
111262
|
-
|
|
111263
|
-
utilityAuthData: utilityAuthData,
|
|
111264
|
-
legacyAccountData: legacyAccountData
|
|
111265
|
-
});
|
|
111266
|
-
var accountParentTags = buildAccountParentTags({
|
|
111267
|
-
utilityAuthData: utilityAuthData,
|
|
111268
|
-
utilityLinksEntry: utilityLinksEntry,
|
|
111269
|
-
legacyAccountData: legacyAccountData
|
|
111270
|
-
});
|
|
112743
|
+
var _resolveHeaderAuthFro = resolveHeaderAuthFromEntry(headerEntry),
|
|
112744
|
+
accountData = _resolveHeaderAuthFro.accountData,
|
|
112745
|
+
accountParentTags = _resolveHeaderAuthFro.accountParentTags;
|
|
111271
112746
|
var cartData = HeaderView_objectSpread(HeaderView_objectSpread({}, (_headerEntry$cart = headerEntry === null || headerEntry === void 0 ? void 0 : headerEntry.cart) !== null && _headerEntry$cart !== void 0 ? _headerEntry$cart : DEFAULT_CART), {}, {
|
|
111272
112747
|
item_count: (_storefrontParams$car = storefrontParams === null || storefrontParams === void 0 ? void 0 : storefrontParams.cartCount) !== null && _storefrontParams$car !== void 0 ? _storefrontParams$car : 0
|
|
111273
112748
|
});
|
|
@@ -111281,13 +112756,10 @@ function HeaderView(_ref5) {
|
|
|
111281
112756
|
"data-country": country,
|
|
111282
112757
|
"data-language": language,
|
|
111283
112758
|
"data-locale": locale,
|
|
111284
|
-
children: [
|
|
111285
|
-
|
|
111286
|
-
|
|
111287
|
-
|
|
111288
|
-
dataTestId: "header-top-ribbon"
|
|
111289
|
-
})
|
|
111290
|
-
})), /*#__PURE__*/(0,jsx_runtime_.jsxs)(TopHeaderRow, {
|
|
112759
|
+
children: [/*#__PURE__*/(0,jsx_runtime_.jsx)(TopRibbonComponent, {
|
|
112760
|
+
data: topRibbon,
|
|
112761
|
+
parentTags: $
|
|
112762
|
+
}), /*#__PURE__*/(0,jsx_runtime_.jsxs)(TopHeaderRow, {
|
|
111291
112763
|
children: [/*#__PURE__*/(0,jsx_runtime_.jsx)(MobileMenuButton, {
|
|
111292
112764
|
onClick: function onClick() {
|
|
111293
112765
|
return setIsMobileMenuOpen(true);
|
|
@@ -111306,7 +112778,9 @@ function HeaderView(_ref5) {
|
|
|
111306
112778
|
}), /*#__PURE__*/(0,jsx_runtime_.jsxs)(MobileUtilityBar, {
|
|
111307
112779
|
children: [/*#__PURE__*/(0,jsx_runtime_.jsx)(HeaderAccountRegion, {
|
|
111308
112780
|
data: accountData,
|
|
111309
|
-
parent$: accountParentTags
|
|
112781
|
+
parent$: accountParentTags,
|
|
112782
|
+
customerData: storefrontParams === null || storefrontParams === void 0 ? void 0 : storefrontParams.customerData,
|
|
112783
|
+
authService: storefrontParams === null || storefrontParams === void 0 ? void 0 : storefrontParams.authService
|
|
111310
112784
|
}), /*#__PURE__*/(0,jsx_runtime_.jsx)(HeaderSearchRegion, {
|
|
111311
112785
|
country: country,
|
|
111312
112786
|
language: language,
|
|
@@ -111324,7 +112798,7 @@ function HeaderView(_ref5) {
|
|
|
111324
112798
|
children: [/*#__PURE__*/(0,jsx_runtime_.jsx)(MarketSelector, {
|
|
111325
112799
|
data: marketSelector,
|
|
111326
112800
|
logo: logoData,
|
|
111327
|
-
locale: String((
|
|
112801
|
+
locale: String((_ref5 = (_headerEntry$locale = headerEntry === null || headerEntry === void 0 ? void 0 : headerEntry.locale) !== null && _headerEntry$locale !== void 0 ? _headerEntry$locale : locale) !== null && _ref5 !== void 0 ? _ref5 : "").trim(),
|
|
111328
112802
|
parent$: headerEntry === null || headerEntry === void 0 || (_headerEntry$$3 = headerEntry.$) === null || _headerEntry$$3 === void 0 ? void 0 : _headerEntry$$3.market_selector__0,
|
|
111329
112803
|
mobileTriggerMode: "drawerPortal",
|
|
111330
112804
|
drawerOpen: isMobileMenuOpen,
|
|
@@ -111333,7 +112807,9 @@ function HeaderView(_ref5) {
|
|
|
111333
112807
|
data: loyaltyData
|
|
111334
112808
|
}), /*#__PURE__*/(0,jsx_runtime_.jsx)(HeaderAccountRegion, {
|
|
111335
112809
|
data: accountData,
|
|
111336
|
-
parent$: accountParentTags
|
|
112810
|
+
parent$: accountParentTags,
|
|
112811
|
+
customerData: storefrontParams === null || storefrontParams === void 0 ? void 0 : storefrontParams.customerData,
|
|
112812
|
+
authService: storefrontParams === null || storefrontParams === void 0 ? void 0 : storefrontParams.authService
|
|
111337
112813
|
}), /*#__PURE__*/(0,jsx_runtime_.jsx)(CartComponent, {
|
|
111338
112814
|
data: cartData,
|
|
111339
112815
|
parent$: headerEntry === null || headerEntry === void 0 || (_headerEntry$$4 = headerEntry.$) === null || _headerEntry$$4 === void 0 ? void 0 : _headerEntry$$4.cart
|
|
@@ -111379,9 +112855,14 @@ HeaderView.propTypes = {
|
|
|
111379
112855
|
searchConfig: (external_prop_types_default()).object,
|
|
111380
112856
|
storefrontParams: external_prop_types_default().shape({
|
|
111381
112857
|
cartCount: (external_prop_types_default()).number,
|
|
111382
|
-
customerData: (external_prop_types_default()).object
|
|
112858
|
+
customerData: (external_prop_types_default()).object,
|
|
112859
|
+
authService: (external_prop_types_default()).object
|
|
111383
112860
|
})
|
|
111384
112861
|
};
|
|
112862
|
+
TopRibbonComponent.propTypes = {
|
|
112863
|
+
data: (external_prop_types_default()).object,
|
|
112864
|
+
parentTags: (external_prop_types_default()).object
|
|
112865
|
+
};
|
|
111385
112866
|
;// ./src/styles/Main.styled.js
|
|
111386
112867
|
|
|
111387
112868
|
function Main_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)."; }
|
|
@@ -111653,7 +113134,8 @@ HeaderContainer.propTypes = {
|
|
|
111653
113134
|
headerEntry: (external_prop_types_default()).object,
|
|
111654
113135
|
storefrontParams: external_prop_types_default().shape({
|
|
111655
113136
|
cartCount: (external_prop_types_default()).number,
|
|
111656
|
-
customerData: (external_prop_types_default()).object
|
|
113137
|
+
customerData: (external_prop_types_default()).object,
|
|
113138
|
+
authService: (external_prop_types_default()).object
|
|
111657
113139
|
})
|
|
111658
113140
|
};
|
|
111659
113141
|
/* harmony default export */ const header_HeaderContainer = (HeaderContainer);
|