@nuskin/nextgen-header 1.37.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 +1831 -357
- package/package-dist/index.js.map +1 -1
- package/package-dist/index.mjs +1833 -359
- package/package-dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/package-dist/index.js
CHANGED
|
@@ -103168,7 +103168,85 @@ HeaderLoyaltyRegion.propTypes = {
|
|
|
103168
103168
|
$: (external_prop_types_default()).object
|
|
103169
103169
|
})
|
|
103170
103170
|
};
|
|
103171
|
-
;// ./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); }
|
|
103172
103250
|
var DEFAULT_SIGN_UP = {
|
|
103173
103251
|
title: "Sign Up",
|
|
103174
103252
|
url: ""
|
|
@@ -103177,7 +103255,54 @@ var DEFAULT_SIGN_IN = {
|
|
|
103177
103255
|
title: "Sign In",
|
|
103178
103256
|
url: ""
|
|
103179
103257
|
};
|
|
103258
|
+
var DEFAULT_SIGNED_IN = {
|
|
103259
|
+
title: "My Account",
|
|
103260
|
+
url: ""
|
|
103261
|
+
};
|
|
103180
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;
|
|
103181
103306
|
var ALLOWED_ICON_NAMES = new Set(["userOutline", "userIcon"]);
|
|
103182
103307
|
var ICON_COLOR_MAP = {
|
|
103183
103308
|
black: "#000000",
|
|
@@ -103213,6 +103338,188 @@ function getEffectiveAuthDisplay(resolvedLinks, sign_up, sign_in) {
|
|
|
103213
103338
|
effectiveSignInTitle: (_effectiveSignIn$titl = effectiveSignIn === null || effectiveSignIn === void 0 ? void 0 : effectiveSignIn.title) !== null && _effectiveSignIn$titl !== void 0 ? _effectiveSignIn$titl : signInTitle
|
|
103214
103339
|
};
|
|
103215
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
|
+
}
|
|
103216
103523
|
function getIconPresentation(icon, icon_color) {
|
|
103217
103524
|
var normalizedIconName = String(icon !== null && icon !== void 0 ? icon : DEFAULT_ICON).trim();
|
|
103218
103525
|
var resolvedIconName = ALLOWED_ICON_NAMES.has(normalizedIconName) ? normalizedIconName : DEFAULT_ICON;
|
|
@@ -103222,49 +103529,146 @@ function getIconPresentation(icon, icon_color) {
|
|
|
103222
103529
|
resolvedIconColor: ICON_COLOR_MAP[normalizedColorName]
|
|
103223
103530
|
};
|
|
103224
103531
|
}
|
|
103225
|
-
|
|
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) {
|
|
103226
103592
|
if (editing) return;
|
|
103227
|
-
|
|
103593
|
+
if (delegateAuthNavigation(authService, "navigateToSignUp", url)) return;
|
|
103594
|
+
navigateToUrl(resolveDefaultSignUpPath());
|
|
103228
103595
|
}
|
|
103229
|
-
function handleSignInActivate(editing, isMobile, setIsModalOpen, url) {
|
|
103596
|
+
function handleSignInActivate(editing, isMobile, setIsModalOpen, url, authService) {
|
|
103230
103597
|
if (editing) return;
|
|
103231
103598
|
if (isMobile) {
|
|
103232
103599
|
setIsModalOpen(true);
|
|
103233
103600
|
return;
|
|
103234
103601
|
}
|
|
103602
|
+
if (delegateAuthNavigation(authService, "navigateToSignIn", url)) return;
|
|
103235
103603
|
navigateToUrl(url);
|
|
103236
103604
|
}
|
|
103237
|
-
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) {
|
|
103238
103635
|
if (editing) return;
|
|
103239
103636
|
closeModal();
|
|
103637
|
+
if (delegateAuthNavigation(authService, methodName, url)) return;
|
|
103638
|
+
if (methodName === "navigateToSignUp") {
|
|
103639
|
+
navigateToUrl(resolveDefaultSignUpPath());
|
|
103640
|
+
return;
|
|
103641
|
+
}
|
|
103240
103642
|
navigateToUrl(url);
|
|
103241
103643
|
}
|
|
103242
|
-
function mergeAuthLinksFromService(links, sign_up, sign_in) {
|
|
103644
|
+
function mergeAuthLinksFromService(links, sign_up, sign_in, signed_in) {
|
|
103243
103645
|
if (!links) return {
|
|
103244
103646
|
sign_up: sign_up,
|
|
103245
|
-
sign_in: sign_in
|
|
103647
|
+
sign_in: sign_in,
|
|
103648
|
+
signed_in: signed_in
|
|
103246
103649
|
};
|
|
103247
103650
|
return {
|
|
103248
103651
|
sign_up: links.sign_up || links.signUp || sign_up,
|
|
103249
|
-
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
|
|
103250
103654
|
};
|
|
103251
103655
|
}
|
|
103252
|
-
;// ./src/components/signup-signin/
|
|
103253
|
-
function
|
|
103254
|
-
function
|
|
103255
|
-
function
|
|
103256
|
-
function
|
|
103257
|
-
function
|
|
103258
|
-
function
|
|
103259
|
-
function
|
|
103260
|
-
function
|
|
103261
|
-
function
|
|
103262
|
-
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; }
|
|
103263
103667
|
|
|
103264
103668
|
|
|
103265
103669
|
function useIsMobileViewport() {
|
|
103266
103670
|
var _useState = (0,external_react_.useState)(false),
|
|
103267
|
-
_useState2 =
|
|
103671
|
+
_useState2 = SignUpSignIn_hooks_slicedToArray(_useState, 2),
|
|
103268
103672
|
isMobile = _useState2[0],
|
|
103269
103673
|
setIsMobile = _useState2[1];
|
|
103270
103674
|
(0,external_react_.useEffect)(function () {
|
|
@@ -103282,27 +103686,29 @@ function useIsMobileViewport() {
|
|
|
103282
103686
|
}, []);
|
|
103283
103687
|
return isMobile;
|
|
103284
103688
|
}
|
|
103285
|
-
function useResolvedAuthLinks(sign_up, sign_in, authService) {
|
|
103689
|
+
function useResolvedAuthLinks(sign_up, sign_in, signed_in, authService) {
|
|
103286
103690
|
var _useState3 = (0,external_react_.useState)({
|
|
103287
103691
|
sign_up: sign_up,
|
|
103288
|
-
sign_in: sign_in
|
|
103692
|
+
sign_in: sign_in,
|
|
103693
|
+
signed_in: signed_in
|
|
103289
103694
|
}),
|
|
103290
|
-
_useState4 =
|
|
103695
|
+
_useState4 = SignUpSignIn_hooks_slicedToArray(_useState3, 2),
|
|
103291
103696
|
resolvedLinks = _useState4[0],
|
|
103292
103697
|
setResolvedLinks = _useState4[1];
|
|
103293
103698
|
(0,external_react_.useEffect)(function () {
|
|
103294
103699
|
setResolvedLinks({
|
|
103295
103700
|
sign_up: sign_up,
|
|
103296
|
-
sign_in: sign_in
|
|
103701
|
+
sign_in: sign_in,
|
|
103702
|
+
signed_in: signed_in
|
|
103297
103703
|
});
|
|
103298
|
-
}, [sign_up, sign_in]);
|
|
103704
|
+
}, [sign_up, sign_in, signed_in]);
|
|
103299
103705
|
(0,external_react_.useEffect)(function () {
|
|
103300
103706
|
var canceled = false;
|
|
103301
103707
|
var canResolve = typeof (authService === null || authService === void 0 ? void 0 : authService.getAuthLinks) === "function";
|
|
103302
103708
|
if (!canResolve) return undefined;
|
|
103303
|
-
|
|
103709
|
+
SignUpSignIn_hooks_asyncToGenerator(/*#__PURE__*/SignUpSignIn_hooks_regenerator().m(function _callee() {
|
|
103304
103710
|
var links, _t;
|
|
103305
|
-
return
|
|
103711
|
+
return SignUpSignIn_hooks_regenerator().w(function (_context) {
|
|
103306
103712
|
while (1) switch (_context.p = _context.n) {
|
|
103307
103713
|
case 0:
|
|
103308
103714
|
_context.p = 0;
|
|
@@ -103311,7 +103717,7 @@ function useResolvedAuthLinks(sign_up, sign_in, authService) {
|
|
|
103311
103717
|
case 1:
|
|
103312
103718
|
links = _context.v;
|
|
103313
103719
|
if (!canceled && links) {
|
|
103314
|
-
setResolvedLinks(mergeAuthLinksFromService(links, sign_up, sign_in));
|
|
103720
|
+
setResolvedLinks(mergeAuthLinksFromService(links, sign_up, sign_in, signed_in));
|
|
103315
103721
|
}
|
|
103316
103722
|
_context.n = 3;
|
|
103317
103723
|
break;
|
|
@@ -103326,7 +103732,7 @@ function useResolvedAuthLinks(sign_up, sign_in, authService) {
|
|
|
103326
103732
|
return function () {
|
|
103327
103733
|
canceled = true;
|
|
103328
103734
|
};
|
|
103329
|
-
}, [authService, sign_in, sign_up]);
|
|
103735
|
+
}, [authService, sign_in, sign_up, signed_in]);
|
|
103330
103736
|
return resolvedLinks;
|
|
103331
103737
|
}
|
|
103332
103738
|
function useEscapeToCloseModal(isModalOpen, setIsModalOpen) {
|
|
@@ -103344,105 +103750,1198 @@ function useEscapeToCloseModal(isModalOpen, setIsModalOpen) {
|
|
|
103344
103750
|
};
|
|
103345
103751
|
}, [isModalOpen, setIsModalOpen]);
|
|
103346
103752
|
}
|
|
103347
|
-
|
|
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
|
|
103348
103976
|
|
|
103349
|
-
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)."; }
|
|
103350
103978
|
var MOBILE_MAX_WIDTH_PX = 1024;
|
|
103351
|
-
var
|
|
103352
|
-
target: "
|
|
103979
|
+
var SignUpSignInRoot = /*#__PURE__*/createStyled("div", true ? {
|
|
103980
|
+
target: "ea5wen561"
|
|
103353
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));
|
|
103354
103982
|
var SignTextLink = /*#__PURE__*/createStyled("span", true ? {
|
|
103355
|
-
target: "
|
|
103983
|
+
target: "ea5wen560"
|
|
103356
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));
|
|
103357
103985
|
var SignUpLink = /*#__PURE__*/createStyled("button", true ? {
|
|
103358
|
-
target: "
|
|
103986
|
+
target: "ea5wen559"
|
|
103359
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));
|
|
103360
103988
|
var SignInLink = /*#__PURE__*/createStyled("button", true ? {
|
|
103361
|
-
target: "
|
|
103989
|
+
target: "ea5wen558"
|
|
103362
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));
|
|
103363
103991
|
var Divider = /*#__PURE__*/createStyled("span", true ? {
|
|
103364
|
-
target: "
|
|
103992
|
+
target: "ea5wen557"
|
|
103365
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));
|
|
103366
103994
|
var IconWrap = /*#__PURE__*/createStyled("span", true ? {
|
|
103367
|
-
target: "
|
|
103995
|
+
target: "ea5wen556"
|
|
103368
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));
|
|
103369
103997
|
var MobileAuthModalBackdrop = /*#__PURE__*/createStyled("div", true ? {
|
|
103370
|
-
target: "
|
|
103998
|
+
target: "ea5wen555"
|
|
103371
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));
|
|
103372
104000
|
var MobileAuthModal = /*#__PURE__*/createStyled("dialog", true ? {
|
|
103373
|
-
target: "
|
|
104001
|
+
target: "ea5wen554"
|
|
103374
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));
|
|
103375
104003
|
var ModalHeaderRow = /*#__PURE__*/createStyled("div", true ? {
|
|
103376
|
-
target: "
|
|
104004
|
+
target: "ea5wen553"
|
|
103377
104005
|
} : 0)( true ? {
|
|
103378
104006
|
name: "wbibpl",
|
|
103379
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"
|
|
103380
104008
|
} : 0);
|
|
103381
104009
|
var ModalTitle = /*#__PURE__*/createStyled("h2", true ? {
|
|
103382
|
-
target: "
|
|
104010
|
+
target: "ea5wen552"
|
|
103383
104011
|
} : 0)( true ? {
|
|
103384
104012
|
name: "1m9bk8n",
|
|
103385
104013
|
styles: "margin:0;color:#252525;font-family:var(--signin-font);font-size:22px;line-height:28px;font-weight:400"
|
|
103386
104014
|
} : 0);
|
|
103387
104015
|
var ModalCancelButton = /*#__PURE__*/createStyled("button", true ? {
|
|
103388
|
-
target: "
|
|
104016
|
+
target: "ea5wen551"
|
|
103389
104017
|
} : 0)( true ? {
|
|
103390
104018
|
name: "u33vv4",
|
|
103391
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;}"
|
|
103392
104020
|
} : 0);
|
|
103393
104021
|
var ModalContent = /*#__PURE__*/createStyled("div", true ? {
|
|
103394
|
-
target: "
|
|
104022
|
+
target: "ea5wen550"
|
|
103395
104023
|
} : 0)( true ? {
|
|
103396
104024
|
name: "150yav4",
|
|
103397
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;}"
|
|
103398
104026
|
} : 0);
|
|
103399
104027
|
var ModalSections = /*#__PURE__*/createStyled("div", true ? {
|
|
103400
|
-
target: "
|
|
104028
|
+
target: "ea5wen549"
|
|
103401
104029
|
} : 0)( true ? {
|
|
103402
104030
|
name: "dbqp8z",
|
|
103403
104031
|
styles: "display:flex;flex-direction:column;width:100%;gap:0;box-sizing:border-box"
|
|
103404
104032
|
} : 0);
|
|
103405
104033
|
var ModalSection = /*#__PURE__*/createStyled("section", true ? {
|
|
103406
|
-
target: "
|
|
104034
|
+
target: "ea5wen548"
|
|
103407
104035
|
} : 0)( true ? {
|
|
103408
104036
|
name: "phcu5u",
|
|
103409
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;}}"
|
|
103410
104038
|
} : 0);
|
|
103411
104039
|
var SectionTitle = /*#__PURE__*/createStyled("h3", true ? {
|
|
103412
|
-
target: "
|
|
104040
|
+
target: "ea5wen547"
|
|
103413
104041
|
} : 0)( true ? {
|
|
103414
104042
|
name: "1kyoijh",
|
|
103415
104043
|
styles: "margin:0;color:#252525;font-family:var(--signin-font);font-size:18px;line-height:22px;font-weight:600;text-transform:uppercase"
|
|
103416
104044
|
} : 0);
|
|
103417
104045
|
var SectionMessage = /*#__PURE__*/createStyled("p", true ? {
|
|
103418
|
-
target: "
|
|
104046
|
+
target: "ea5wen546"
|
|
103419
104047
|
} : 0)( true ? {
|
|
103420
104048
|
name: "18ee69d",
|
|
103421
104049
|
styles: "margin:0;color:#000000de;font-family:var(--signin-font);font-size:16px;line-height:22px;font-weight:400;overflow-wrap:anywhere"
|
|
103422
104050
|
} : 0);
|
|
103423
104051
|
var PrimaryButton = /*#__PURE__*/createStyled("button", true ? {
|
|
103424
|
-
target: "
|
|
104052
|
+
target: "ea5wen545"
|
|
103425
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);
|
|
103426
104315
|
var OutlinedButton = /*#__PURE__*/createStyled("button", true ? {
|
|
103427
|
-
target: "
|
|
104316
|
+
target: "ea5wen50"
|
|
103428
104317
|
} : 0)( true ? {
|
|
103429
104318
|
name: "16bjh6l",
|
|
103430
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;}"
|
|
103431
104320
|
} : 0);
|
|
103432
|
-
;// ./src/components/signup-signin/
|
|
103433
|
-
|
|
103434
|
-
|
|
103435
|
-
|
|
103436
|
-
|
|
103437
|
-
|
|
103438
|
-
|
|
103439
|
-
|
|
103440
|
-
|
|
103441
|
-
|
|
103442
|
-
|
|
103443
|
-
|
|
103444
|
-
|
|
104321
|
+
;// ./src/components/signup-signin/SignUpSignInProfilePanel.jsx
|
|
104322
|
+
|
|
104323
|
+
|
|
104324
|
+
|
|
104325
|
+
|
|
104326
|
+
|
|
104327
|
+
|
|
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
|
+
});
|
|
104341
|
+
};
|
|
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
|
+
});
|
|
104388
|
+
};
|
|
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
|
+
|
|
103445
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",
|
|
104847
|
+
onClick: function onClick() {
|
|
104848
|
+
return handleModalAuthNavigate(editing, closeModal, effectiveSignIn === null || effectiveSignIn === void 0 ? void 0 : effectiveSignIn.url, authService, "navigateToSignIn");
|
|
104849
|
+
},
|
|
104850
|
+
children: copy.sign_in_cta_label
|
|
104851
|
+
})]
|
|
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");
|
|
104862
|
+
},
|
|
104863
|
+
"aria-label": copy.sign_up_cta_aria_label,
|
|
104864
|
+
children: copy.sign_up_cta_label
|
|
104865
|
+
})]
|
|
104866
|
+
})]
|
|
104867
|
+
});
|
|
104868
|
+
}
|
|
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
|
|
104943
|
+
};
|
|
104944
|
+
;// ./src/components/signup-signin/SignUpSignIn.jsx
|
|
103446
104945
|
|
|
103447
104946
|
|
|
103448
104947
|
|
|
@@ -103450,184 +104949,95 @@ function SignUpOrSignIn_arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
|
|
103450
104949
|
|
|
103451
104950
|
|
|
103452
104951
|
|
|
103453
|
-
|
|
103454
|
-
|
|
103455
|
-
|
|
103456
|
-
sign_in_message: "Have an account already? Please sign in.",
|
|
103457
|
-
sign_in_cta_label: "Sign In",
|
|
103458
|
-
sign_up_heading: "Sign Up",
|
|
103459
|
-
sign_up_message: "New user? Please Sign up to continue",
|
|
103460
|
-
sign_up_cta_label: "Create Account",
|
|
103461
|
-
sign_up_cta_aria_label: "Create Account"
|
|
103462
|
-
};
|
|
103463
|
-
function SignUpOrSignIn(_ref) {
|
|
103464
|
-
var _ref$show = _ref.show,
|
|
103465
|
-
show = _ref$show === void 0 ? true : _ref$show,
|
|
103466
|
-
_ref$icon = _ref.icon,
|
|
103467
|
-
icon = _ref$icon === void 0 ? DEFAULT_ICON : _ref$icon,
|
|
104952
|
+
function SignUpSignIn(_ref) {
|
|
104953
|
+
var show = _ref.show,
|
|
104954
|
+
icon = _ref.icon,
|
|
103468
104955
|
icon_color = _ref.icon_color,
|
|
103469
|
-
|
|
103470
|
-
|
|
103471
|
-
|
|
103472
|
-
|
|
103473
|
-
|
|
103474
|
-
|
|
103475
|
-
|
|
103476
|
-
|
|
103477
|
-
|
|
103478
|
-
|
|
103479
|
-
|
|
103480
|
-
|
|
103481
|
-
|
|
103482
|
-
|
|
103483
|
-
|
|
103484
|
-
|
|
103485
|
-
|
|
103486
|
-
|
|
103487
|
-
|
|
103488
|
-
|
|
103489
|
-
|
|
103490
|
-
|
|
103491
|
-
|
|
103492
|
-
|
|
103493
|
-
|
|
103494
|
-
|
|
103495
|
-
|
|
103496
|
-
|
|
103497
|
-
|
|
103498
|
-
|
|
103499
|
-
|
|
103500
|
-
|
|
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, {
|
|
103501
104995
|
"data-testid": "signup-signin",
|
|
103502
|
-
children: [
|
|
103503
|
-
|
|
103504
|
-
|
|
103505
|
-
|
|
103506
|
-
|
|
103507
|
-
|
|
103508
|
-
|
|
103509
|
-
|
|
103510
|
-
|
|
103511
|
-
|
|
103512
|
-
|
|
103513
|
-
|
|
103514
|
-
|
|
103515
|
-
|
|
103516
|
-
|
|
103517
|
-
|
|
103518
|
-
|
|
103519
|
-
|
|
103520
|
-
|
|
103521
|
-
|
|
103522
|
-
|
|
103523
|
-
|
|
103524
|
-
|
|
103525
|
-
|
|
103526
|
-
|
|
103527
|
-
|
|
103528
|
-
|
|
103529
|
-
|
|
103530
|
-
|
|
103531
|
-
|
|
103532
|
-
|
|
103533
|
-
|
|
103534
|
-
|
|
103535
|
-
|
|
103536
|
-
|
|
103537
|
-
|
|
103538
|
-
|
|
103539
|
-
|
|
103540
|
-
|
|
103541
|
-
|
|
103542
|
-
|
|
103543
|
-
})), showMobileModal ? /*#__PURE__*/(0,jsx_runtime_.jsx)(MobileAuthModalBackdrop, {
|
|
103544
|
-
"data-testid": "signin-modal-backdrop",
|
|
103545
|
-
onClick: closeModal,
|
|
103546
|
-
children: /*#__PURE__*/(0,jsx_runtime_.jsxs)(MobileAuthModal, {
|
|
103547
|
-
open: true,
|
|
103548
|
-
"aria-modal": "true",
|
|
103549
|
-
"aria-label": effectiveSignInTitle,
|
|
103550
|
-
onClick: function onClick(e) {
|
|
103551
|
-
return e.stopPropagation();
|
|
103552
|
-
},
|
|
103553
|
-
children: [/*#__PURE__*/(0,jsx_runtime_.jsx)(ModalHeaderRow, {
|
|
103554
|
-
children: /*#__PURE__*/(0,jsx_runtime_.jsx)(ModalCancelButton, {
|
|
103555
|
-
"data-testid": "signin-modal-cancel",
|
|
103556
|
-
"aria-label": modal_copy === null || modal_copy === void 0 ? void 0 : modal_copy.close_dialog_aria_label,
|
|
103557
|
-
type: "button",
|
|
103558
|
-
onClick: closeModal,
|
|
103559
|
-
children: "\xD7"
|
|
103560
|
-
})
|
|
103561
|
-
}), /*#__PURE__*/(0,jsx_runtime_.jsx)(ModalContent, {
|
|
103562
|
-
children: /*#__PURE__*/(0,jsx_runtime_.jsxs)(ModalSections, {
|
|
103563
|
-
children: [/*#__PURE__*/(0,jsx_runtime_.jsxs)(ModalSection, {
|
|
103564
|
-
children: [/*#__PURE__*/(0,jsx_runtime_.jsx)(SectionTitle, {
|
|
103565
|
-
children: modal_copy === null || modal_copy === void 0 ? void 0 : modal_copy.sign_in_heading
|
|
103566
|
-
}), /*#__PURE__*/(0,jsx_runtime_.jsx)(SectionMessage, {
|
|
103567
|
-
children: modal_copy === null || modal_copy === void 0 ? void 0 : modal_copy.sign_in_message
|
|
103568
|
-
}), /*#__PURE__*/(0,jsx_runtime_.jsx)(PrimaryButton, {
|
|
103569
|
-
type: "button",
|
|
103570
|
-
"data-testid": "signin-modal-signin-cta",
|
|
103571
|
-
onClick: function onClick() {
|
|
103572
|
-
return handleModalAuthNavigate(editing, closeModal, effectiveSignIn === null || effectiveSignIn === void 0 ? void 0 : effectiveSignIn.url);
|
|
103573
|
-
},
|
|
103574
|
-
children: modal_copy === null || modal_copy === void 0 ? void 0 : modal_copy.sign_in_cta_label
|
|
103575
|
-
})]
|
|
103576
|
-
}), /*#__PURE__*/(0,jsx_runtime_.jsxs)(ModalSection, {
|
|
103577
|
-
children: [/*#__PURE__*/(0,jsx_runtime_.jsx)(SectionTitle, {
|
|
103578
|
-
children: modal_copy === null || modal_copy === void 0 ? void 0 : modal_copy.sign_up_heading
|
|
103579
|
-
}), /*#__PURE__*/(0,jsx_runtime_.jsx)(SectionMessage, {
|
|
103580
|
-
children: modal_copy === null || modal_copy === void 0 ? void 0 : modal_copy.sign_up_message
|
|
103581
|
-
}), /*#__PURE__*/(0,jsx_runtime_.jsx)(OutlinedButton, {
|
|
103582
|
-
"data-testid": "signin-modal-create-account-cta",
|
|
103583
|
-
type: "button",
|
|
103584
|
-
onClick: function onClick() {
|
|
103585
|
-
return handleModalAuthNavigate(editing, closeModal, effectiveSignUp === null || effectiveSignUp === void 0 ? void 0 : effectiveSignUp.url);
|
|
103586
|
-
},
|
|
103587
|
-
"aria-label": modal_copy === null || modal_copy === void 0 ? void 0 : modal_copy.sign_up_cta_aria_label,
|
|
103588
|
-
children: modal_copy === null || modal_copy === void 0 ? void 0 : modal_copy.sign_up_cta_label
|
|
103589
|
-
})]
|
|
103590
|
-
})]
|
|
103591
|
-
})
|
|
103592
|
-
})]
|
|
103593
|
-
})
|
|
103594
|
-
}) : null]
|
|
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
|
+
})]
|
|
103595
105037
|
});
|
|
103596
105038
|
}
|
|
103597
|
-
|
|
103598
|
-
|
|
103599
|
-
icon: (external_prop_types_default()).string,
|
|
103600
|
-
icon_color: (external_prop_types_default()).string,
|
|
103601
|
-
sign_up: external_prop_types_default().shape({
|
|
103602
|
-
title: (external_prop_types_default()).string,
|
|
103603
|
-
url: (external_prop_types_default()).string
|
|
103604
|
-
}),
|
|
103605
|
-
sign_in: external_prop_types_default().shape({
|
|
103606
|
-
title: (external_prop_types_default()).string,
|
|
103607
|
-
url: (external_prop_types_default()).string
|
|
103608
|
-
}),
|
|
103609
|
-
modal_copy: external_prop_types_default().shape({
|
|
103610
|
-
close_dialog_aria_label: (external_prop_types_default()).string,
|
|
103611
|
-
sign_in_heading: (external_prop_types_default()).string,
|
|
103612
|
-
sign_in_message: (external_prop_types_default()).string,
|
|
103613
|
-
sign_in_cta_label: (external_prop_types_default()).string,
|
|
103614
|
-
sign_up_heading: (external_prop_types_default()).string,
|
|
103615
|
-
sign_up_message: (external_prop_types_default()).string,
|
|
103616
|
-
sign_up_cta_label: (external_prop_types_default()).string,
|
|
103617
|
-
sign_up_cta_aria_label: (external_prop_types_default()).string
|
|
103618
|
-
}),
|
|
103619
|
-
authService: external_prop_types_default().shape({
|
|
103620
|
-
getAuthLinks: (external_prop_types_default()).func
|
|
103621
|
-
}),
|
|
103622
|
-
parent$: external_prop_types_default().shape({
|
|
103623
|
-
icon: (external_prop_types_default()).object,
|
|
103624
|
-
icon_color: (external_prop_types_default()).object,
|
|
103625
|
-
sign_up: (external_prop_types_default()).object,
|
|
103626
|
-
sign_up_url: (external_prop_types_default()).object,
|
|
103627
|
-
sign_in: (external_prop_types_default()).object,
|
|
103628
|
-
sign_in_url: (external_prop_types_default()).object
|
|
103629
|
-
})
|
|
103630
|
-
};
|
|
105039
|
+
SignUpSignIn.propTypes = signUpSignInPropTypes;
|
|
105040
|
+
|
|
103631
105041
|
;// ./src/components/header/regions/HeaderAccountRegion.jsx
|
|
103632
105042
|
|
|
103633
105043
|
|
|
@@ -103635,15 +105045,21 @@ SignUpOrSignIn.propTypes = {
|
|
|
103635
105045
|
|
|
103636
105046
|
function HeaderAccountRegion(_ref) {
|
|
103637
105047
|
var data = _ref.data,
|
|
103638
|
-
parent$ = _ref.parent
|
|
105048
|
+
parent$ = _ref.parent$,
|
|
105049
|
+
customerData = _ref.customerData,
|
|
105050
|
+
authService = _ref.authService;
|
|
103639
105051
|
var show = (data === null || data === void 0 ? void 0 : data.show) !== false;
|
|
103640
105052
|
if (!show) return null;
|
|
103641
|
-
return /*#__PURE__*/(0,jsx_runtime_.jsx)(
|
|
105053
|
+
return /*#__PURE__*/(0,jsx_runtime_.jsx)(SignUpSignIn, {
|
|
103642
105054
|
show: show,
|
|
103643
105055
|
icon: data === null || data === void 0 ? void 0 : data.icon,
|
|
103644
105056
|
icon_color: data === null || data === void 0 ? void 0 : data.icon_color,
|
|
103645
105057
|
sign_up: data === null || data === void 0 ? void 0 : data.sign_up,
|
|
103646
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,
|
|
103647
105063
|
parent$: parent$
|
|
103648
105064
|
});
|
|
103649
105065
|
}
|
|
@@ -103659,15 +105075,22 @@ HeaderAccountRegion.propTypes = {
|
|
|
103659
105075
|
sign_in: external_prop_types_default().shape({
|
|
103660
105076
|
title: (external_prop_types_default()).string,
|
|
103661
105077
|
url: (external_prop_types_default()).string
|
|
103662
|
-
})
|
|
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
|
|
103663
105084
|
}),
|
|
105085
|
+
customerData: (external_prop_types_default()).object,
|
|
105086
|
+
authService: (external_prop_types_default()).object,
|
|
103664
105087
|
parent$: external_prop_types_default().shape({
|
|
103665
105088
|
icon: (external_prop_types_default()).object,
|
|
103666
105089
|
icon_color: (external_prop_types_default()).object,
|
|
103667
105090
|
sign_up: (external_prop_types_default()).object,
|
|
103668
105091
|
sign_up_url: (external_prop_types_default()).object,
|
|
103669
105092
|
sign_in: (external_prop_types_default()).object,
|
|
103670
|
-
|
|
105093
|
+
signed_in: (external_prop_types_default()).object
|
|
103671
105094
|
})
|
|
103672
105095
|
};
|
|
103673
105096
|
;// ./src/components/cart/Cart.styled.js
|
|
@@ -103886,7 +105309,7 @@ HeaderCartRegion.defaultProps = {
|
|
|
103886
105309
|
var Close = __webpack_require__(9781);
|
|
103887
105310
|
;// ./src/utils/parseIconAsset.js
|
|
103888
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); }
|
|
103889
|
-
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; } } }; }
|
|
103890
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; } }
|
|
103891
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; }
|
|
103892
105315
|
/**
|
|
@@ -103915,7 +105338,7 @@ function getDirectUrl(value) {
|
|
|
103915
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));
|
|
103916
105339
|
}
|
|
103917
105340
|
function findUrlInValues(values, depth) {
|
|
103918
|
-
var _iterator =
|
|
105341
|
+
var _iterator = parseIconAsset_createForOfIteratorHelper(values),
|
|
103919
105342
|
_step;
|
|
103920
105343
|
try {
|
|
103921
105344
|
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
@@ -103970,7 +105393,7 @@ function getFieldValueFromGroup(source, keys) {
|
|
|
103970
105393
|
var expandedKeys = keys.flatMap(function (key) {
|
|
103971
105394
|
return [key, "".concat(key, "__0")];
|
|
103972
105395
|
});
|
|
103973
|
-
var _iterator2 =
|
|
105396
|
+
var _iterator2 = parseIconAsset_createForOfIteratorHelper(expandedKeys),
|
|
103974
105397
|
_step2;
|
|
103975
105398
|
try {
|
|
103976
105399
|
for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
|
|
@@ -111051,6 +112474,135 @@ MarketSelector.propTypes = {
|
|
|
111051
112474
|
$: (external_prop_types_default()).object
|
|
111052
112475
|
})
|
|
111053
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
|
+
}
|
|
111054
112606
|
;// ./src/components/header/HeaderView.jsx
|
|
111055
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); }
|
|
111056
112608
|
function HeaderView_slicedToArray(r, e) { return HeaderView_arrayWithHoles(r) || HeaderView_iterableToArrayLimit(r, e) || HeaderView_unsupportedIterableToArray(r, e) || HeaderView_nonIterableRest(); }
|
|
@@ -111081,6 +112633,7 @@ function HeaderView_toPrimitive(t, r) { if ("object" != HeaderView_typeof(t) ||
|
|
|
111081
112633
|
|
|
111082
112634
|
|
|
111083
112635
|
|
|
112636
|
+
|
|
111084
112637
|
var DEFAULT_LOGO = {
|
|
111085
112638
|
wordmark: "NU SKIN",
|
|
111086
112639
|
home_href: "/",
|
|
@@ -111097,19 +112650,6 @@ var DEFAULT_MARKET_SELECTOR = {
|
|
|
111097
112650
|
cancel_text: "Cancel",
|
|
111098
112651
|
control_label: DEFAULT_LOCALE.control_label
|
|
111099
112652
|
};
|
|
111100
|
-
var DEFAULT_ACCOUNT = {
|
|
111101
|
-
show: true,
|
|
111102
|
-
icon: "userOutline",
|
|
111103
|
-
icon_color: undefined,
|
|
111104
|
-
sign_up: {
|
|
111105
|
-
title: "Sign Up",
|
|
111106
|
-
url: ""
|
|
111107
|
-
},
|
|
111108
|
-
sign_in: {
|
|
111109
|
-
title: "Sign In",
|
|
111110
|
-
url: ""
|
|
111111
|
-
}
|
|
111112
|
-
};
|
|
111113
112653
|
var DEFAULT_LOYALTY = {
|
|
111114
112654
|
label: "Nu Skin Rewards",
|
|
111115
112655
|
url: "/rewards",
|
|
@@ -111120,17 +112660,7 @@ var DEFAULT_CART = {
|
|
|
111120
112660
|
aria_label: "Shopping cart",
|
|
111121
112661
|
count: 0
|
|
111122
112662
|
};
|
|
111123
|
-
function
|
|
111124
|
-
for (var _len = arguments.length, values = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
111125
|
-
values[_key] = arguments[_key];
|
|
111126
|
-
}
|
|
111127
|
-
for (var _i = 0, _values = values; _i < _values.length; _i++) {
|
|
111128
|
-
var value = _values[_i];
|
|
111129
|
-
if (value !== undefined && value !== null) return value;
|
|
111130
|
-
}
|
|
111131
|
-
return undefined;
|
|
111132
|
-
}
|
|
111133
|
-
function normalizeShowFlag(value) {
|
|
112663
|
+
function HeaderView_normalizeShowFlag(value) {
|
|
111134
112664
|
var fallback = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
|
|
111135
112665
|
if (value === undefined || value === null) return fallback;
|
|
111136
112666
|
if (typeof value === "boolean") return value;
|
|
@@ -111143,62 +112673,9 @@ function normalizeShowFlag(value) {
|
|
|
111143
112673
|
}
|
|
111144
112674
|
return Boolean(value);
|
|
111145
112675
|
}
|
|
111146
|
-
function
|
|
111147
|
-
|
|
111148
|
-
|
|
111149
|
-
return [];
|
|
111150
|
-
}
|
|
111151
|
-
function pickUtilityLinksEntry(utilityLinksEntries) {
|
|
111152
|
-
return utilityLinksEntries.find(function (entry) {
|
|
111153
|
-
return entry === null || entry === void 0 ? void 0 : entry.sign_up_sign_in_component;
|
|
111154
|
-
}) || utilityLinksEntries[0] || null;
|
|
111155
|
-
}
|
|
111156
|
-
function pickAuthTextField(authData, fieldKey) {
|
|
111157
|
-
var value = authData === null || authData === void 0 ? void 0 : authData[fieldKey];
|
|
111158
|
-
if (typeof value !== "string") return undefined;
|
|
111159
|
-
var trimmed = value.trim();
|
|
111160
|
-
return trimmed || undefined;
|
|
111161
|
-
}
|
|
111162
|
-
function buildAccountData(_ref) {
|
|
111163
|
-
var _firstDefined, _firstDefined2, _firstDefined3, _firstDefined4, _firstDefined5, _firstDefined6;
|
|
111164
|
-
var utilityAuthData = _ref.utilityAuthData,
|
|
111165
|
-
legacyAccountData = _ref.legacyAccountData;
|
|
111166
|
-
return {
|
|
111167
|
-
show: normalizeShowFlag(firstDefined(utilityAuthData === null || utilityAuthData === void 0 ? void 0 : utilityAuthData.show, legacyAccountData === null || legacyAccountData === void 0 ? void 0 : legacyAccountData.show), DEFAULT_ACCOUNT.show),
|
|
111168
|
-
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,
|
|
111169
|
-
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,
|
|
111170
|
-
sign_up: {
|
|
111171
|
-
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,
|
|
111172
|
-
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
|
|
111173
|
-
},
|
|
111174
|
-
sign_in: {
|
|
111175
|
-
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,
|
|
111176
|
-
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
|
|
111177
|
-
}
|
|
111178
|
-
};
|
|
111179
|
-
}
|
|
111180
|
-
function buildAccountParentTags(_ref2) {
|
|
111181
|
-
var _utilityLinksEntry$$, _utilityLinksEntry$$2, _legacyAccountData$$, _legacyAccountData$$2, _legacyAccountData$$3;
|
|
111182
|
-
var utilityAuthData = _ref2.utilityAuthData,
|
|
111183
|
-
utilityLinksEntry = _ref2.utilityLinksEntry,
|
|
111184
|
-
legacyAccountData = _ref2.legacyAccountData;
|
|
111185
|
-
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);
|
|
111186
|
-
var pickTag = function pickTag(key) {
|
|
111187
|
-
var _utilityAuthData$$;
|
|
111188
|
-
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]);
|
|
111189
|
-
};
|
|
111190
|
-
return {
|
|
111191
|
-
icon: pickTag("icon") || (legacyAccountData === null || legacyAccountData === void 0 || (_legacyAccountData$$ = legacyAccountData.$) === null || _legacyAccountData$$ === void 0 ? void 0 : _legacyAccountData$$.icon),
|
|
111192
|
-
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),
|
|
111193
|
-
sign_up: pickTag("sign_up"),
|
|
111194
|
-
sign_up_url: pickTag("sign_up_url"),
|
|
111195
|
-
sign_in: pickTag("sign_in"),
|
|
111196
|
-
sign_in_url: pickTag("sign_in_url")
|
|
111197
|
-
};
|
|
111198
|
-
}
|
|
111199
|
-
function LoyaltyComponent(_ref3) {
|
|
111200
|
-
var data = _ref3.data;
|
|
111201
|
-
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);
|
|
111202
112679
|
if (!show) return null;
|
|
111203
112680
|
return withTracking(/*#__PURE__*/(0,jsx_runtime_.jsx)(HeaderLoyaltyRegion, {
|
|
111204
112681
|
data: data
|
|
@@ -111209,11 +112686,11 @@ function LoyaltyComponent(_ref3) {
|
|
|
111209
112686
|
LoyaltyComponent.propTypes = {
|
|
111210
112687
|
data: (external_prop_types_default()).object
|
|
111211
112688
|
};
|
|
111212
|
-
function TopRibbonComponent(
|
|
112689
|
+
function TopRibbonComponent(_ref2) {
|
|
111213
112690
|
var _data$top_ribbon_aria;
|
|
111214
|
-
var data =
|
|
111215
|
-
|
|
111216
|
-
parentTags =
|
|
112691
|
+
var data = _ref2.data,
|
|
112692
|
+
_ref2$parentTags = _ref2.parentTags,
|
|
112693
|
+
parentTags = _ref2$parentTags === void 0 ? {} : _ref2$parentTags;
|
|
111217
112694
|
if (!(data !== null && data !== void 0 && data.show_top_ribbon)) return null;
|
|
111218
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) || {}), {}, {
|
|
111219
112696
|
children: /*#__PURE__*/(0,jsx_runtime_.jsx)(top_ribbon_TopRibbon, {
|
|
@@ -111230,9 +112707,9 @@ function LogoComponent(props) {
|
|
|
111230
112707
|
componentType: "logo"
|
|
111231
112708
|
});
|
|
111232
112709
|
}
|
|
111233
|
-
function CartComponent(
|
|
111234
|
-
var data =
|
|
111235
|
-
parent$ =
|
|
112710
|
+
function CartComponent(_ref3) {
|
|
112711
|
+
var data = _ref3.data,
|
|
112712
|
+
parent$ = _ref3.parent$;
|
|
111236
112713
|
return withTracking(/*#__PURE__*/(0,jsx_runtime_.jsx)(HeaderCartRegion, {
|
|
111237
112714
|
data: data,
|
|
111238
112715
|
parent$: parent$
|
|
@@ -111244,37 +112721,28 @@ CartComponent.propTypes = {
|
|
|
111244
112721
|
data: (external_prop_types_default()).object,
|
|
111245
112722
|
parent$: (external_prop_types_default()).object
|
|
111246
112723
|
};
|
|
111247
|
-
function HeaderView(
|
|
111248
|
-
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,
|
|
111249
|
-
var country =
|
|
111250
|
-
language =
|
|
111251
|
-
locale =
|
|
111252
|
-
headerEntry =
|
|
111253
|
-
searchConfig =
|
|
111254
|
-
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;
|
|
111255
112732
|
var _useState = (0,external_react_.useState)(false),
|
|
111256
112733
|
_useState2 = HeaderView_slicedToArray(_useState, 2),
|
|
111257
112734
|
isMobileMenuOpen = _useState2[0],
|
|
111258
112735
|
setIsMobileMenuOpen = _useState2[1];
|
|
111259
112736
|
var mobileMarketTriggerMountRef = (0,external_react_.useRef)(null);
|
|
111260
112737
|
var editing = isEditingMode();
|
|
111261
|
-
var
|
|
111262
|
-
var utilityLinksEntries = normalizeUtilityLinksEntries(utilityLinksRaw);
|
|
112738
|
+
var utilityLinksEntries = normalizeUtilityLinksEntries(headerEntry === null || headerEntry === void 0 ? void 0 : headerEntry.utility_links);
|
|
111263
112739
|
var utilityLinksEntry = pickUtilityLinksEntry(utilityLinksEntries);
|
|
111264
112740
|
var logoData = parseLogoData((_headerEntry$logo = headerEntry === null || headerEntry === void 0 ? void 0 : headerEntry.logo) !== null && _headerEntry$logo !== void 0 ? _headerEntry$logo : DEFAULT_LOGO);
|
|
111265
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;
|
|
111266
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;
|
|
111267
|
-
var
|
|
111268
|
-
|
|
111269
|
-
|
|
111270
|
-
utilityAuthData: utilityAuthData,
|
|
111271
|
-
legacyAccountData: legacyAccountData
|
|
111272
|
-
});
|
|
111273
|
-
var accountParentTags = buildAccountParentTags({
|
|
111274
|
-
utilityAuthData: utilityAuthData,
|
|
111275
|
-
utilityLinksEntry: utilityLinksEntry,
|
|
111276
|
-
legacyAccountData: legacyAccountData
|
|
111277
|
-
});
|
|
112743
|
+
var _resolveHeaderAuthFro = resolveHeaderAuthFromEntry(headerEntry),
|
|
112744
|
+
accountData = _resolveHeaderAuthFro.accountData,
|
|
112745
|
+
accountParentTags = _resolveHeaderAuthFro.accountParentTags;
|
|
111278
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), {}, {
|
|
111279
112747
|
item_count: (_storefrontParams$car = storefrontParams === null || storefrontParams === void 0 ? void 0 : storefrontParams.cartCount) !== null && _storefrontParams$car !== void 0 ? _storefrontParams$car : 0
|
|
111280
112748
|
});
|
|
@@ -111310,7 +112778,9 @@ function HeaderView(_ref6) {
|
|
|
111310
112778
|
}), /*#__PURE__*/(0,jsx_runtime_.jsxs)(MobileUtilityBar, {
|
|
111311
112779
|
children: [/*#__PURE__*/(0,jsx_runtime_.jsx)(HeaderAccountRegion, {
|
|
111312
112780
|
data: accountData,
|
|
111313
|
-
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
|
|
111314
112784
|
}), /*#__PURE__*/(0,jsx_runtime_.jsx)(HeaderSearchRegion, {
|
|
111315
112785
|
country: country,
|
|
111316
112786
|
language: language,
|
|
@@ -111328,7 +112798,7 @@ function HeaderView(_ref6) {
|
|
|
111328
112798
|
children: [/*#__PURE__*/(0,jsx_runtime_.jsx)(MarketSelector, {
|
|
111329
112799
|
data: marketSelector,
|
|
111330
112800
|
logo: logoData,
|
|
111331
|
-
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(),
|
|
111332
112802
|
parent$: headerEntry === null || headerEntry === void 0 || (_headerEntry$$3 = headerEntry.$) === null || _headerEntry$$3 === void 0 ? void 0 : _headerEntry$$3.market_selector__0,
|
|
111333
112803
|
mobileTriggerMode: "drawerPortal",
|
|
111334
112804
|
drawerOpen: isMobileMenuOpen,
|
|
@@ -111337,7 +112807,9 @@ function HeaderView(_ref6) {
|
|
|
111337
112807
|
data: loyaltyData
|
|
111338
112808
|
}), /*#__PURE__*/(0,jsx_runtime_.jsx)(HeaderAccountRegion, {
|
|
111339
112809
|
data: accountData,
|
|
111340
|
-
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
|
|
111341
112813
|
}), /*#__PURE__*/(0,jsx_runtime_.jsx)(CartComponent, {
|
|
111342
112814
|
data: cartData,
|
|
111343
112815
|
parent$: headerEntry === null || headerEntry === void 0 || (_headerEntry$$4 = headerEntry.$) === null || _headerEntry$$4 === void 0 ? void 0 : _headerEntry$$4.cart
|
|
@@ -111383,7 +112855,8 @@ HeaderView.propTypes = {
|
|
|
111383
112855
|
searchConfig: (external_prop_types_default()).object,
|
|
111384
112856
|
storefrontParams: external_prop_types_default().shape({
|
|
111385
112857
|
cartCount: (external_prop_types_default()).number,
|
|
111386
|
-
customerData: (external_prop_types_default()).object
|
|
112858
|
+
customerData: (external_prop_types_default()).object,
|
|
112859
|
+
authService: (external_prop_types_default()).object
|
|
111387
112860
|
})
|
|
111388
112861
|
};
|
|
111389
112862
|
TopRibbonComponent.propTypes = {
|
|
@@ -111661,7 +113134,8 @@ HeaderContainer.propTypes = {
|
|
|
111661
113134
|
headerEntry: (external_prop_types_default()).object,
|
|
111662
113135
|
storefrontParams: external_prop_types_default().shape({
|
|
111663
113136
|
cartCount: (external_prop_types_default()).number,
|
|
111664
|
-
customerData: (external_prop_types_default()).object
|
|
113137
|
+
customerData: (external_prop_types_default()).object,
|
|
113138
|
+
authService: (external_prop_types_default()).object
|
|
111665
113139
|
})
|
|
111666
113140
|
};
|
|
111667
113141
|
/* harmony default export */ const header_HeaderContainer = (HeaderContainer);
|