Welcome to the
! Please enjoy our special offers for you
Unbox & Discover on March 21
Your world is listening. Share the excitement about the next Galaxy.
or copy link
https://shopsamsung.page.link/HAzA2xPwWFALcJ9r5
Copy
Copied!
-->
");
};
var apiUrl =
window.location.hostname.indexOf("stgcl") > -1
? "https://us3.ecom-qa.samsung.com/v1/campaigns/reserve"
: "https://www.samsung.com/us/api/v1/campaigns/reserve";
var thankYouPage = function (name) {
if (window.innerWidth < 768) {
if ($(".radio-list-container").hasClass("slick-initialized")) {
$(".radio-list-container").slick("refresh");
} else {
$(".radio-list-container").slick({
slidesToShow: 1.05,
slidesToScroll: 1,
dots: false,
arrows: false,
responsive: [
{
breakpoint: 9999,
settings: "unslick",
},
{
breakpoint: 767,
settings: {
slidesToShow: 1.05,
slidesToScroll: 1,
},
},
],
});
}
} else {
if ($(".radio-list-container").hasClass("slick-initialized")) {
$(".radio-list-container").slick("unslick");
}
}
function formatDate(date) {
var d = new Date(date),
month = "" + (d.getMonth() + 1),
day = "" + d.getDate(),
year = d.getFullYear();
if (month.length < 2) month = "0" + month;
if (day.length < 2) day = "0" + day;
return [year, month, day].join("");
}
$main.hide();
$mainDisclaimer.hide();
$thankYou.show();
reserveUtag.thankYou(name);
if (window.adobe) {
var profileText = "OneLaunchHE2024_";
if ($(".mobileReserve__device__option.selected").length == 1) {
profileText =
profileText +
$(".mobileReserve__device__option.selected").data("target-text");
} else if ($(".mobileReserve__device__option.selected").length == 2) {
profileText =
profileText +
$(".mobileReserve__device__option.selected")
.eq(0)
.data("target-text") +
"&" +
$(".mobileReserve__device__option.selected")
.eq(1)
.data("target-text");
} else if ($(".mobileReserve__device__option.selected").length == 3) {
profileText = profileText + "all";
}
profileText = profileText + "_reserve";
var trackObj = {
mbox: "target-reserve",
params: {},
};
trackObj["params"]["profile." + profileText] = formatDate(new Date());
window.adobe &&
window.adobe.target &&
window.adobe.target.trackEvent(trackObj);
}
};
var getSource = function (oneClick) {
window.mobilecheck = function () {
return window.innerWidth < 769;
};
function getMobileOperatingSystem() {
var userAgent =
navigator.userAgent || navigator.vendor || window.opera;
if (/android/i.test(userAgent)) {
return "-ANDRIOD";
}
if (/iPad|iPhone|iPod/.test(userAgent) && !window.MSStream) {
return "-IOS";
}
return "";
}
var device = ~window.location.href.indexOf("/us/app/")
? "APP"
: window.mobilecheck()
? "MOBWEB"
: "WEB";
// var flow = oneClick ? '-ONECLICK' : '-ORGANIC';
var flow = "";
var platform = "";
if (device === "MOBWEB") {
platform = getMobileOperatingSystem();
}
return device + platform + flow;
};
var submit = async function (e) {
$spinner.addClass("show");
info.oneClick = !info.oneClick;
if (info.oneClick) {
reserveUtag.submit();
} else {
reserveUtag.submit(true);
}
var formArray = $form.serializeArray();
formArray.push(
// {
// name: 'cothers12',
// value: 'No'
// },
{
name: "cothers2",
value: "N",
}
);
var formData,
tmpArray = [];
formArray.forEach(function (item) {
if (item.name !== ":cq_csrf_token") {
// if (item.name === "cothers19" && item.value)
// tmpArray.push(item.name + "=" + item.value.replace(/[ ()-]/g, ""));
// else if (item.name === "cothers12")
// tmpArray.push(`${item.name}=${$('#cothers12').is(':checked') ? 'Y' : 'N'}`);
if (item.name === "cothers2")
tmpArray.push(
`${item.name}=${$("#cothers2").is(":checked") ? "Y" : "N"}`
);
else tmpArray.push(item.name + "=" + item.value);
}
});
if (info.oneClick) {
for (const [key, value] of Object.entries(info?.dropdowns)) {
tmpArray.push(`${key}=${value}`);
}
// if ($('#cothers2')?.prop("checked") && $('#cothers19')?.val()) {
// tmpArray.push('cothers5=Y')
// }
tmpArray = [...new Set(tmpArray)];
formData = tmpArray.join("&");
} else {
formData = tmpArray.filter((_) => !_.indexOf("email")).join("&");
}
let token = "";
try {
token = await grecaptcha.enterprise.execute(apiKey, {
action: "submit",
});
} catch (error) {
errorMessage("Something went wrong.");
$spinner.removeClass("show");
return;
}
if (!token) {
errorMessage("Something went wrong.");
$spinner.removeClass("show");
return;
}
serializeData = formData;
formData += "&campaignid=" + campaignId;
// formData += '&recaptcha=' + recaptchaVal;
// formData += "&source=" + getSource(false);
formData += "&cothers=" + getSource(false);
formData += "&is_update=Y";
formData += `&token=${token}`;
if (window.visitor)
formData +=
"&cothers18=" + window.visitor.getMarketingCloudVisitorID();
if (!info.oneClick) {
var c17 = "";
for (const [key, value] of Object.entries(info.product_interests)) {
if (key !== "Q-Series Soundbar") c17 += `${value}:`;
else c17 += value;
}
var c13 = "";
for (const [key, value] of Object.entries(info.product_sizes)) {
if (key !== "55B") c13 += `${value}:`;
else c13 += value;
}
// formData += `&cothers17=${c17}`
// formData += `&cothers13=${c13}`
}
$.ajax({
type: "POST",
// url: "https://pages.samsung.com/us/DailySweepsEntries.do",
//url: "https://www.samsung.com/us/api/v1/campaigns/reserve",
url: apiUrl,
contentType: "application/x-www-form-urlencoded",
data: formData,
success: function (data) {
if (data.error) {
errorMessage("something went wrong. Please try again later.");
return;
}
if (info.oneClick) {
if (window.EcommFlutterClient) {
if (window.isSignedIn) {
window.EcommFlutterClient.postMessage(
JSON.stringify({
name: "setUserAppPreference",
params: {
key: "c360_segmentID",
value: JSON.stringify([
JSON.stringify({
TVReserve: {
TVReserve: {},
},
}),
]),
},
})
);
} else {
window.EcommFlutterClient.postMessage(
JSON.stringify({
name: "setUserDevicePreference",
params: {
key: "c360_segmentID",
value: JSON.stringify([
JSON.stringify({
TVReserve: {
TVReserve: {},
},
}),
]),
},
})
);
}
}
thankYouPage("thankyou");
} else {
thankYouPage("thankyou_preference");
}
$spinner.removeClass("show");
$(".mobileReserve__fixedbutton__submit").attr("disabled", false);
$(".mobileReserve__fixedbutton__submit").css("display", "none");
if (!info.oneClick) {
$(".mobileReserve__fasttrack__body__cyd__before").hide();
$(".mobileReserve__fasttrack__body__cyd__after").addClass(
"active"
);
}
},
}).fail(function (error) {
$spinner.removeClass("show");
if (error && error.responseText.indexOf("recaptcha") > -1)
errorMessage("Google reCaptcha is not loaded. Please try again.");
else errorMessage("something went wrong. Please try again later.");
});
};
// Shop APP Login
var getUserSignIn = function () {
window.isSignedInStatus = function (e) {
if (e) {
try {
var siginData = JSON.parse(e);
if (siginData && siginData.status) {
window.isSignedIn = true;
} else {
window.isSignedIn = false;
}
} catch (error) {
window.isSignedIn = false;
}
} else {
window.isSignedIn = false;
}
};
window.EcommFlutterClient.onmessage = function (e) {
var message = e && e.data;
var event = message && JSON.parse(message);
if (event && event.name === "isSignedInStatus") {
var status = event.data.status;
window.isSignedIn = status;
}
};
window.EcommFlutterClient.postMessage(
JSON.stringify({
name: "isSignedIn",
params: { callbackEvent: "isSignedInStatus" },
})
);
};
if (window.EcommFlutterClient) {
getUserSignIn();
}
selfEnv.init = function () {
$input.each(function () {
var self = $(this);
self.focus(function () {
if (self.attr("name") === "cothers19")
self.next("label").text("Phone");
self.parent().addClass("filled");
});
self.on("propertychange input", function () {
if (self.attr("name") === "cothers19")
self.next("label").text("Phone");
self.parent().addClass("filled");
});
self.blur(function () {
if (!this.value) {
self.parent().removeClass("filled");
}
if ($form.valid() && $("#cothers2").is(":checked")) {
$submit.prop("disabled", false);
$(".mobileReserve__fixedbutton__submit").prop("disabled", false);
} else {
$submit.prop("disabled", true);
$(".mobileReserve__fixedbutton__submit").prop("disabled", true);
}
});
});
if ($.validator) {
$.validator.addMethod(
"firstNameProhibitedChars",
function (value, element) {
var alphaRegExp = new RegExp("^[A-Za-z]+$");
if (alphaRegExp.test(value)) return true;
else return false;
},
"Numbers & Special characters not allowed"
);
$.validator.addMethod(
"phoneUS",
function (value, element) {
var phone_number = value.replace(/[ ()-]/g, "");
var phoneRegExp = new RegExp("^[0-9]{10}$");
return (
this.optional(element) ||
(phone_number.length > 9 && phoneRegExp.test(phone_number))
);
},
"Please enter a valid US Phone number"
);
$.validator.addMethod(
"zipcodeUS",
function (value, element) {
return (
this.optional(element) || /\d{5}-\d{4}$|^\d{5}$/.test(value)
);
},
"Please enter a valid ZIP Code."
);
}
$('input[validatetype="phone"]')?.mask("(000) 000-0000");
formInit($form);
$("#cothers2").change(function () {
if ($form.valid() && $("#cothers2").is(":checked")) {
$submit.prop("disabled", false);
$(".mobileReserve__fixedbutton__submit").prop("disabled", false);
} else {
$submit.prop("disabled", true);
$(".mobileReserve__fixedbutton__submit").prop("disabled", true);
}
});
// $(document).click(function () {
// if ($form.valid() && $(this).is(":checked")) {
// $submit.prop("disabled", false);
// $(".mobileReserve__fixedbutton__submit").prop("disabled", false);
// } else {
// $submit.prop("disabled", true);
// $(".mobileReserve__fixedbutton__submit").prop("disabled", true);
// }
// });
};
$('input[type="checkbox"][name="product_interest"]').on(
"click",
function (e) {
var checked = $(this).prop("checked");
var value = $(this).attr("value");
info.product_interests[value] = checked ? value : "";
}
);
$('input[type="checkbox"][name="product_size"]').on(
"click",
function (e) {
var checked = $(this).prop("checked");
var value = $(this).attr("value");
info.product_sizes[value] = checked ? value : "";
}
);
// $("#cothers2").on("click", function (e) {
// var checked = $(this).prop("checked");
// var mobile = $("#cothers19").val();
// if (checked && mobile) {
// $(".mobileReserve__message-promotional").show();
// } else {
// $(".mobileReserve__message-promotional").hide();
// }
// });
// $("#cothers19").on("change", function (e) {
// var checked = $("#cothers2").prop("checked");
// var mobile = $(this).val();
// if (checked && mobile) {
// $(".mobileReserve__message-promotional").show();
// } else {
// $(".mobileReserve__message-promotional").hide();
// }
// });
$(".mobileReserve__fixedbutton__submit").on("click", function () {
$(".mobileReserve__form").submit();
});
$(".mobileReserve__cd_Submit").on("click", function () {
$(".mobileReserve__form").submit();
});
var firstFocus = false;
$(".mobileReserve__dropdown").on("click", function () {
if ($(this).hasClass("active")) {
$(this).find(".option").attr("tabindex", -1);
} else {
$(this).find(".option").attr("tabindex", 0);
}
if (!firstFocus) {
$(this).toggleClass("active");
} else {
firstFocus = false;
}
});
$(".mobileReserve__dropdown").on("focus", function () {
firstFocus = true;
if ($(this).hasClass("active")) {
$(this).find(".option").attr("tabindex", -1);
} else {
$(this).find(".option").attr("tabindex", 0);
}
$(this).toggleClass("active");
});
$(".mobileReserve__dropdown").on("keypress", function (e) {
if (e?.which === 13) {
$(this).toggleClass("active");
}
});
var prevEle;
$(document).on("focusin", function (e) {
firstFocus = false;
if (
$(".mobileReserve__dropdown[data-category='cothers14']").hasClass(
"active"
) &&
!$(e.target).closest(
".mobileReserve__dropdown[data-category='cothers14']"
).length
) {
prevEle.closest(".mobileReserve__dropdown").removeClass("active");
}
if (
$(".mobileReserve__dropdown[data-category='cothers15']").hasClass(
"active"
) &&
!$(e.target).closest(
".mobileReserve__dropdown[data-category='cothers15']"
).length
) {
prevEle.closest(".mobileReserve__dropdown").removeClass("active");
}
prevEle = $(e.target);
});
$(".mobileReserve__dropdown .option-container .option").on(
"click",
function () {
var category = $(this)
.parents(".mobileReserve__dropdown")
.data().category;
$(this).parents(".mobileReserve__dropdown").addClass("selected");
$(this)
.parents(".mobileReserve__dropdown")
.find(".left")
.text($(this)?.data()?.id);
info.dropdowns[category] = $(this)?.data()?.id;
if ($form.valid() && $("#cothers2").is(":checked")) {
$submit.prop("disabled", false);
$(".mobileReserve__fixedbutton__submit").prop("disabled", false);
} else {
$submit.prop("disabled", true);
$(".mobileReserve__fixedbutton__submit").prop("disabled", true);
}
}
);
$(".mobileReserve__media").videoController({
style: "inline",
el: $(".mobileReserve__play"),
autoplay: "Y",
});
$(".mobileReserve__thankYou .share_button").on("click", function () {
// A.shareButton();
var e = {
title: "Ready to break the rules?",
text: "I just reserved the latest Samsung Galaxy device and unlocked an extra $200 instant Samsung Credit toward other Galaxy products¤ and more exclusive offers when it’s time to pre-order — and you can, too. \nReserve yours now here",
url: "https://shopsamsung.page.link/n4LENH8mV4LkGVeh9",
subject:
"I just reserved the latest Samsung Galaxy device and unlocked an extra $200 instant Samsung Credit toward other Galaxy products¤ and more exclusive offers when it’s time to pre-order — and you can, too. \nReserve yours now here",
chooserTitle: "Ready to break the rules?",
};
window.innerWidth < 769 && navigator.share
? navigator.share &&
navigator
.share(e)
.then(function () {})
.catch(console.error)
: window.EcommAndroidClient && window.EcommAndroidClient.share
? window.EcommAndroidClient.share(JSON.stringify(e))
: ($(".mobileReserve__share_imgcontainer").addClass("active"),
$("body").addClass("overlay_noscroll"));
}),
$(".mobileReserve__thankYou .close_button").on("click", function () {
// A.closeShareButton(),
$(".mobileReserve__share_imgcontainer").removeClass("active"),
$(".copy_links_copied").hide(),
$("body").removeClass("overlay_noscroll");
}),
$(".copy_links_btn").on("click", function () {
// A.copyShareLink();
var e = document.createRange();
e.selectNode(document.getElementById("links_url")),
window.getSelection().removeAllRanges(),
window.getSelection().addRange(e),
document.execCommand("copy"),
$(".copy_links_copied").show(),
setTimeout(function () {
$(".copy_links_copied").fadeOut();
}, 1e3),
window.getSelection().removeAllRanges();
}),
$(".mobileReserve__thankYou .share_icons a").on("click", function () {
var e = $(this).data("media");
// A.shareLink(e);
}),
$(".calendar_button").on("click", function (e) {
e.preventDefault(), e.stopPropagation();
var t = $(this).data("value");
// A.calendar(t);
$(".mobileReserve__calendar-list").toggleClass("active");
}),
$(".mobileReserve__calendar-list a").on("click", function (e) {
e.stopPropagation();
}),
$(".mobileReserve__dropdown .option-container .option").on(
"keypress",
function () {
var category = $(this)
.parents(".mobileReserve__dropdown")
.data().category;
$(this).parents(".mobileReserve__dropdown").addClass("selected");
$(this)
.parents(".mobileReserve__dropdown")
.find(".left")
.text($(this)?.data()?.id);
info.dropdowns[category] = $(this)?.data()?.id;
// if ($form.valid() && info.dropdowns.cothers15 && info.dropdowns.cothers14) {
if ($form.valid() && $("#cothers2").is(":checked")) {
$submit.prop("disabled", false);
$(".mobileReserve__fixedbutton__submit").prop("disabled", false);
} else {
$submit.prop("disabled", true);
$(".mobileReserve__fixedbutton__submit").prop("disabled", true);
}
}
);
$(window).load(function () {
reserveUtag.land();
});
selfEnv.reInit = function (_$template) {};
}
document.addEventListener("DOMContentLoaded", (event) => {
var rs = new Reserve();
rs.init();
});
})(jQuery, window, undefined);
(function (i) {
"use strict";
function r(e) {
return e < 10 && (e = "0" + e), e;
}
function a(e) {
this.options = e;
}
i.extend(a.prototype, {
init: function (e) {
var t = i(e);
(this.deadline = new Date(
Date.parse(new Date()) + this.options.timeRemaining
)),
(this.daysSpan = t.find(".days")),
(this.hoursSpan = t.find(".hours")),
(this.minutesSpan = t.find(".minutes")),
(this.secondsSpan = t.find(".seconds")),
(this.timeinterval = setInterval(this.updateClock.bind(this), 1e3)),
t.addClass("inited"),
this.updateClock();
},
updateClock: function () {
var e,
t,
i,
a,
n,
s =
((e = this.deadline),
(t = Date.parse(e) - Date.parse(new Date())),
(i = r(Math.floor((t / 1e3) % 60))),
(a = r(Math.floor((t / 1e3 / 60) % 60))),
(n = r(Math.floor((t / 36e5) % 24))),
{
total: t,
days: r(Math.floor(t / 864e5)),
hours: n,
minutes: a,
seconds: i,
});
this.daysSpan && this.daysSpan.text(s.days),
this.hoursSpan && this.hoursSpan.text(s.hours),
this.minutesSpan && this.minutesSpan.text(s.minutes),
this.secondsSpan && this.secondsSpan.text(s.seconds),
s.total <= 0 && (clearInterval(this.timeinterval), location.reload());
},
}),
(i.fn.countDown = function (e) {
var t = new a(i.extend({}, { timeRemaining: 0 }, e));
i(this).hasClass("inited") || t.init(this);
});
})(jQuery),
$(document).ready(function () {
"use strict";
var e,
t,
i,
a = $(".mobileReserve__countdown.timeDiff").attr("data-timeDiff");
a &&
((e = Date.now()),
(t = new Date(a.replace(/Z$/, "-05:00")).getTime()),
0 < (i = parseInt(t - e))
? $(".mobileReserve__countdown__content-count").countDown({
timeRemaining: i,
})
: $(".mobileReserve__countdown").hide());
});