(function() { function bxBootstrap() { var re = /bot|crawl|slurp|spider|mediapartners|headlesschrome|snap-prefetch|remotasks|woorank|uptime\.com|facebookexternalhit|facebookcatalog/i; if (re.test(navigator.userAgent) || navigator.userAgent == '') { return; } if (!(window.bouncex&&bouncex.website)) { var pushedData = []; if(window.bouncex && bouncex.push && bouncex.length){ pushedData = bouncex; } window.bouncex = {}; bouncex.pushedData = pushedData; bouncex.website = {"id":3842,"name":"Samsung","cookie_name":"bounceClientVisit3842","domain":"samsung.comus","ct":"fp_local_storage","ally":0,"ei":0,"tcjs":"","cjs":"/* enable.feature.DISABLE_RELOAD_CAMPAIGNS_V2 */\n/* enable.feature.SHARED_RUNTIME */\nwindow.bouncex.omnitureLinkTrackEvergreen = function(label, event, campId, callToAction) {\n var ctaFormat = callToAction !== undefined && callToAction.length > 0 ? ':' + callToAction : '';\n if (typeof window.utag === 'object' && typeof window.utag.link === 'function') {\n bouncex.log({\n 'link_cat': 'wunderkind',\n 'link_id': 'wunderkind:modal'+ event + ctaFormat,\n 'link_position': 'wunderkindcampaign>' + campId,\n 'event_name': 'wunderkind_modal_' + event,\n 'wunderkinddata': label,\n 'ctaFormat': ctaFormat\n });\n utag.link({\n 'link_cat': 'wunderkind',\n 'link_id': 'wunderkind:modal'+ event + ctaFormat,\n 'link_position': 'wunderkindcampaign>' + campId,\n 'event_name': 'wunderkind_modal_' + event,\n 'wunderkinddata': label\n });\n }\n};\n\n//update the device map for any onsite campaign that needs to return dynamic pricing info such as trade-in values etc.\n\nbouncex.deviceMap = {\n \"galaxy-s10\": 651, //\n \"/us/mobile/galaxy-s10/\" : 651,\n \"galaxy-note10\": 750, //\n \"/us/mobile/galaxy-note10/\" : 750,\n \"galaxy-s20\": 801,\n \"galaxy-s20-5g\": 801,\n \"/us/mobile/galaxy-s20-5g/\" : 801,\n \"galaxy-s22\": 845,\n \"galaxy-s22-ultra\": 846,\n \"galaxy-s23\": 826,\n \"galaxy-s23-ultra\": 828,\n \"galaxy-note20\": 802,\n \"galaxy-note20-5g\": 802,\n \"/us/smartphones/galaxy-note20-5g/\" :802,\n \"galaxy-s20-fe\": 803,\n \"galaxy-s20fe\" : 803,\n \"galaxy-s20-fe-5g\" : 803, \n \"/us/mobile/galaxy-s20-5g/s20-fe-5g/\" : 803,\n \"galaxy-zflip3\": 815,\n \"galaxy-z-flip3-5g\": 815,\n \"galaxy-zflip4\": 835,\n \"galaxy-z-flip4\": 835,\n \"galaxy-zflip\": 811,\n \"galaxy-z-flip\": 811,\n \"/us/mobile/galaxy-z-flip/\" : 811,\n \"galaxy-fold2\": 951,\n \"galaxy-z-fold2-5g\" : 951,\n \"/us/smartphones/galaxy-z-fold2-5g/\" : 951,\n \"galaxy-fold3\": 817,\n \"galaxy-z-fold3\": 817,\n \"galaxy-z-fold3-5g\": 817,\n \"galaxy-fold4\": 837,\n \"galaxy-z-fold4\": 837,\n \"galaxy-s21-ultra-5g\": 806,\n \"galaxy-s21-5g\": 806,\n \"galaxy-a50\": 702, \n \"galaxy-tab-s7\": 931,\n \"galaxy-a71-5g\": 702,\n \"galaxy-a54-5g\": 705,\n \"galaxy-z-fold5\": 942,\n \"galaxy-z-flip5\": 940,\n\n\n\n /* other */\n \"galaxy-s8\": 501,\n \"galaxy-note8\": 502,\n \"galaxy-note9\": 601,\n \"/us/mobile/phones/galaxy-note/galaxy-note9-512gb--unlocked--sm-n960uzbfxaa/\" : 601,\n \"galaxy-a\": 702,\n \"galaxy-a-phones\" : 703,\n \"galaxy-j\": 641,\n \"galaxy-s9\": 512,\n \"galaxy-a-series\": 703,\n \"galaxy-zflip-tb\": 821,\n \"galaxy-s20-bts\": 881,\n \"galaxy-fold2-tb\": 952,\n \"daas-tv\": 791,\n \"daas-mobile\": 781,\n \"galaxy-tab\": 554,\n \"galaxy-watch\": 861,\n \"us-cellular\": 901,\n \"galaxy-tab-S9\": 946\n};\n\n/* https://www.wrike.com/open.htm?id=694367793 */\n(function() {\n if (typeof createdCart !== 'undefined' && bouncex.website.pts === 'cart') {\n Promise.resolve(createdCart).then(function(value) {\n var lineItem = value.data.line_items || {},\n length = lineItem.length,\n key = Object.keys(lineItem) !== undefined && Object.keys(lineItem)[0],\n //deviceGrade = lineItem[key].exchange_attributes.device_info.device_grade || false;\n deviceGrade = lineItem[key] && lineItem[key].exchange_attributes && lineItem[key].exchange_attributes.device_info;\n \n if (deviceGrade === 'C') {\n bouncex.setv('trade_in_status', 'cracked');\n } else if (deviceGrade === 'A') {\n bouncex.setv('trade_in_status', 'not_cracked');\n }\n });\n }\n})();\n\n/* https://www.wrike.com/open.htm?id=834159078 */\nbouncex.infoStore = {\n sessionStorageIdentifier: 'bxInfoStore',\n set: function(data) {\n var hashedData = bouncex.lz.compressToURI(JSON.stringify(data));\n try {\n sessionStorage.setItem(this.sessionStorageIdentifier, hashedData);\n } catch(e) {\n bouncex.err('session storage failure');\n }\n },\n \n get: function() {\n var info = sessionStorage.getItem(this.sessionStorageIdentifier);\n return info ? JSON.parse(bouncex.lz.decompressFromURI(info)) : '';\n },\n \n infoIsStored: function() {\n return !!sessionStorage.getItem(this.sessionStorageIdentifier);\n },\n \n populateFields: function(fields) {\n if (!this.infoIsStored()) return;\n \n var data = this.get();\n for (var field in fields) {\n if (fields.hasOwnProperty(field)) {\n fields[field].val(data[field]);\n }\n }\n }\n};\n\nbouncex.infoStore.populateFields({\n email: jQuery('#email')\n});\n\nif (bouncex.website.pts === 'checkout') {\n /* cart_discount_total */\n (function(){\n window.createdCart && window.createdCart.then(function (cart) {\n var total = bouncex.utils.getNestedProp('data.cart_discount.total', false, cart);\n bouncex.setVarAndReload('cart_discount_total', total.toFixed(2));\n }); \n })();\n \n /* cart_items */\n (function() {\n window.createdCart && window.createdCart.then(function (cart) {\n var items = bouncex.utils.getNestedProp('data.line_items', {}, cart),\n keys = Object.keys(items),\n skus = [];\n for (var i = 0; i < keys.length; i++) {\n var current = items[keys[i]];\n skus.push(current.sku_id)\n }\n if (skus.length > 0) {\n bouncex.setVarAndReload('cart_items', skus.join(' '));\n }\n }); \n })();\n \n /* cart_product_family */\n (function() {\n window.createdCart && window.createdCart.then(function (resp) {\n var productFamilies = [],\n lineItems = bouncex.utils.getNestedProp('data.line_items', {}, resp),\n keys = Object.keys(lineItems);\n for (var i = 0; i < keys.length; i++) {\n var currentProd = lineItems[keys[i]],\n currentProdFamily = bouncex.utils.getNestedProp('attributes.product_family', '', currentProd);\n productFamilies.push(currentProdFamily);\n }\n if (productFamilies.length > 0) {\n bouncex.setVarAndReload('cart_product_family', productFamilies.join(', '));\n }\n });\n })();\n}\n\n/* https://www.wrike.com/open.htm?id=841549028 */\nif (bouncex.website.pts === 'product') {\n var sku = jQuery('.product-details__info-sku').text(),\n atcButtons = jQuery('.product-details__info-cta .cta-button, .product-top-nav__cta'),\n rtvSKUs = bouncex.vars.cart_items ? bouncex.vars.cart_items.trim().split(' ') : [];\n\n bouncex.on(jQuery('.product-details__info-cta .cta-button, .product-top-nav__cta'), 'click.bx-atc', function() {\n if (jQuery(this).not('.ha-disabled').length > 0) {\n rtvSKUs.push(sku);\n bouncex.setv('cart_items', rtvSKUs.join(' '));\n }\n });\n}\n\n/* enable.feature.COMPLIANCE_REFACTOR_ENABLED */","force_https":false,"waypoints":false,"content_width":900,"gai":"","swids":"","sd":0,"ljq":"auto","campaign_id":0,"is_preview":false,"aco":{"first_party_limit":"3500","local_storage":"1"},"cmp":{"gdpr":0,"gmp":0,"whitelist_check":0},"burls":[],"ple":false,"fbe":true,"mas":1,"map":1,"gar":true,"ete":1,"ettm":false,"etjs":"var REPLEN_BASE_URL = 'https://www.samsung.com/us/web/express/cart/#/init-cart/?&step=CART';\n\n/******** helper functions *********/\nfunction isValidDomain() {\n\treturn ['www.samsung.com'].indexOf(window.location.hostname) > -1 \n\t\t&& window.location.href.indexOf('www.samsung.com/us/') > -1\n\t\t&& window.location.href.indexOf('/business/') === -1;\n}\n\nfunction isEnglish() {\n\tvar lang = jQuery('html').attr('lang') || '';\n\treturn lang === 'en-US' || lang === 'en';\n}\n\n// Dev note (TS) 2/24/22: phones_data object seems to be missing on some phone PDPs\n// adding this additional category check in the meantime to ensure we track phones correctly in order to send correct series\nfunction checkIfPhoneCategory() {\n\tvar url = bouncex.utils.url.allowParams(),\n\t\tisPhonePage = url.indexOf('/smartphones/') > -1 || url.indexOf('/phones/') > -1,\n\t\tisAccessory = url.indexOf('accessories') > -1;\n\t\n\tif(isPhonePage && !isAccessory) {\n\t\treturn 'phones';\n\t}\n\n\treturn '';\n}\n\n// get phone data object and set defaults if they are undefined. Do not use this\n// function for control flow. For control flow, use !!window.phones_data\nfunction getPhoneData(){\n\tvar pd = bouncex.utils.getNestedProp('phones_data', {});\n\tpd.product_id = pd.product_id || '';\n\t//if ID is the same, double check ID from HTML instead of dataLayer\n\tif(bouncex.vars.ibx_prev_id === pd.product_id){\n\t\tpd.product_id = jQuery('.flexRowContainer .sku').text().indexOf('/') > -1 ? jQuery('.flexRowContainer .sku').text().split('/')[1].trim() : jQuery('.flexRowContainer .sku').text();\n\t}\n\tpd.product_name = pd.product_name || '';\n\tpd.product_image = pd.product_image || '';\n\tpd.product_subcategory = pd.product_subcategory || '';\n return pd;\n}\n\n// get utag data and set defaults if they are undefined\nfunction getUtagData() {\n\tvar ud = bouncex.utils.getNestedProp('utag_data', {});\n\tud.product_id = ud.product_id || [''];\n ud['qp.modelCode'] = ud['qp.modelCode'] || '';\n ud.product_name = ud.product_name || [''];\n ud.product_image = ud.product_image || '';\n\tud.product_category = checkIfPhoneCategory() || ud.product_category || '';\n\tud.product_price = ud.product_price || [''];\n\treturn ud\n}\n\nfunction decodeHtmlEntity(encodedString) {\n\tvar textArea = document.createElement('textarea');\n\ttextArea.innerHTML = encodedString;\n\treturn textArea.value;\n}\n\nfunction getPageType() {\n\tif(!!window.phones_data) {\n\t\treturn 'product';\n\t} \n\n\tif (jQuery('div.product-card-v2__item').length > 0) {\n\t\treturn 'category';\n\t} \n\n\treturn bouncex.website.pts;\n}\n\n/******** start item tracking *********/\n// for phone and tablet pages with all kinds of configurations\nfunction getConfiguratorPrice() {\n return jQuery('.selected.type-device, .selected.type-capacity').eq(0)\n .find('.price-wrapper span.price:first').text().trim()\n .replace(/[^0-9.]/g,'');\n}\n\n// Build wknd item object from phone_data object specific to phone pdp's\n// Phone id's do not change based on memory or screen size, so it is fine to\n// evaluate the id from the phone_data object.\n// ex: https://www.samsung.com/us/smartphones/galaxy-s21-5g/buy/galaxy-s21-5g-128gb-unlocked-sm-g991uzwaxaa/\n// ex w/model code: https://www.samsung.com/us/mobile/phones/galaxy-a/buy/?modelCode=SM-A526UZKDXAA\nfunction getPhoneItem() {\n var pd = getPhoneData();\n return {\n id: pd.product_id,\n copy: pd.product_name,\n imageurl: pd.product_image,\n\t\tcategory: pd.product_subcategory,\n\t\tprice: getConfiguratorPrice(),\n instock: true\n };\n}\n\n// non-phone non-configurable pages, utag data does not refresh as a user\n// clicks through ids. Evaluate id, copy, and imageurl from the updated DOM.\n// ex: https://www.samsung.com/us/televisions-home-theater/tvs/the-frame/43-the-frame-qled-4k-smart-tv-2021-qn43ls03aafxza/\n// ex: https://www.samsung.com/us/home-appliances/microwaves/over-the-range/1-1-cu-ft-smart-slim-over-the-range-microwave-with-400-cfm-hood-ventilation-wi-fi-voice-control-in-black-stainless-steel-me11a7510dg-aa/\n// ex: https://www.samsung.com/us/televisions-home-theater/tvs/qled-4k-tvs/85-class-qled-4k-qe1c-qn85qe1cafxza/\nfunction getNonPhoneItemDOM() {\n bouncex.log(\"getNonPhoneItemDom\");\n \n var imageurl = jQuery('.product-details__photo .product-details__img').eq(0).attr('src') || jQuery('#thumbnailsContainer img:first').attr('src') || '',\n price = jQuery('.product-details__info-selector .selected .price').attr('data-sell') || jQuery('span[class^=\"Summary_totalprice__\"]').text().trim() || '';\n \n return {\n id: jQuery('.product-details__info-sku:visible').text().trim() || jQuery('p[class^=\"Header_sku_\"]').text().trim(),\n copy: jQuery('.product-details__info-title').text().trim() || jQuery('h3[class^=\"Header_productTitle_\"]').text().trim(),\n // strip params of 'blur' images\n imageurl: imageurl.replace(/((\\?|#).+)/, ''),\n category: '',\n price: price\n };\n}\n\n// modelCode is an id for item url's with the parameter 'modelCode'\n// eg: https://www.samsung.com/us/tablets/tab-s7/buy/?modelCode=SM-T733NLIAXAR\n// if an item is non-phone with a modelCode, then its id or modelCode param\n// value will not update as a user clicks, so we can use the initial\n// 'qp.modelCode' value as id on page load. This applies to tablets.\nfunction getModelItem(modelCode) {\n return {\n id: modelCode || getUtagData()['qp.modelCode'],\n copy: jQuery('#device_top, #model_top').eq(0)\n .find('.tile7.selected.type-device p.name').text().trim(),\n imageurl: jQuery('.galleryImage:first').attr('src') || '',\n category: checkIfPhoneCategory() || 'tab',\n price: getConfiguratorPrice(),\n };\n}\n\n// This function does not work for the bundle pages: https://www.samsung.com/us/shop/new-appliance-package-offer/details/29-cu-ft-full-depth-bespoke-4door-flextm-refrigerator-in-matte-black-steel-63-cu-ft-electric-range-convection-microwave-and-smart-linear-dishwasher-package/\n// ex: https://www.samsung.com/us/televisions-home-theater/tvs/the-frame/43-the-frame-qled-4k-smart-tv-2021-qn43ls03aafxza/\n// ex: https://www.samsung.com/us/home-appliances/microwaves/over-the-range/1-1-cu-ft-smart-slim-over-the-range-microwave-with-400-cfm-hood-ventilation-wi-fi-voice-control-in-black-stainless-steel-me11a7510dg-aa/\nfunction getNonPhoneItem() {\n var ud = getUtagData(),\n item = ud['qp.modelCode'] ? getModelItem(ud['qp.modelCode']) : \n getNonPhoneItemDOM();\n item.category = item.category || ud.product_category;\n item.price = item.price.replace(/[^0-9.]/g,'');\n item.instock = ud.stock_status === 'Y' || bouncex.vars.in_stock;\n \n\t\n\tif(item.id === undefined || item.id === \"\"){\n\t\tif(ud.product_id[0]){\n\t\t\titem.id = ud.product_id[0];\n\t\t} else {\n\t\t \n\t\t var copyText = jQuery('.flexRowContainer .sku').text() || jQuery('[class*=\"Header_header__flexRowContainer\"] span').text()\n\t\t\titem.id = copyText.indexOf('/') > -1 ? copyText.split('/')[1].trim() : copyText\n\t\t}\n\t}\n\n\tif(item.copy === undefined || item.copy === \"\" ){\n\t\tif(ud.product_name[0]){\n\t\t\titem.copy = ud.product_name[0];\n\t\t} else {\n\t\t\titem.copy = jQuery('.title-wrapper h1, [class*=\"ProductTitle\"] h1').first().text();\n\t\t}\n\t}\n\t\n\titem.price = item.price === undefined || item.price === \"\" ? ud.product_price[0] : item.price;\n\t\n\tif(item.imageurl === undefined || item.imageurl === \"\"){\n\t\tif(jQuery('link[as=\"image\"]').length > 0){\n\t\t\titem.imageurl = jQuery('link[as=\"image\"]').attr('href').split('?')[0];\n\t\t} else {\n\t\t item.imageurl = getFallBackImage();\n\t\t}\n\t}\n return item;\n}\n\nfunction getFallBackImage(){\n var productScript = $('script[type=\"application/ld+json\"]').filter(function () {\n if($(this).text().trim() !== \"\"){\n var jsonData = JSON.parse($(this).text());\n return jsonData && jsonData[\"@type\"] === \"Product\";\n }\n });\n\n // Check if the selected script element exists\n if (productScript.length > 0) {\n // Parse the JSON content of the script element\n var productData = JSON.parse(productScript.text());\n \n // Check if the parsed data has the expected @type value\n if (productData[\"@type\"] === \"Product\") {\n // Extract the image URL\n var imageURL = productData.image.split('?')[0];\n return imageURL;\n } \n }\n\n\tif (jQuery('.gallery-wrapper[data-index=\"0\"] img').length > 0){\n\t var tempImg = jQuery('.gallery-wrapper[data-index=\"0\"] img').attr('src');\n\t\treturn tempImg.indexOf('?') > -1 ? tempImg.split('?')[0] : tempImg\n\t}\n\t\n\tif(jQuery('#thumbnailImagesContainer img').length > 0){\n\t var tempImg = jQuery('#thumbnailImagesContainer img').attr('src');\n\t return tempImg.indexOf('?') > -1 ? tempImg.split('?')[0] : tempImg\n\t}\n return \"\";\n}\n\n// buildItem first evaluates item data specific to a phone or non-phone item\n// after which, default or shared keys are added to item object\nfunction buildItem() {\n var item = !!window.phones_data ? getPhoneItem() : getNonPhoneItem();\n item.id = item.id.toUpperCase();\n\t\n // type check for backwards compatibility\n if (!typeof item.category === 'string') {\n item.category = item.category[0] || '';\n }\n\n // decoding of category is for backwards compatibility\n\titem.category = decodeHtmlEntity(item.category).replace(/&|andamp;/g,'and')\n\t\t.toLowerCase() || 'global';\n\n\t// splitting of copy is for backwards compatibility\n // The right expression is for backwards compatibility is attempts to parse\n // the DOM for copy.\n item.copy = item.copy.split(',')[0].split('(')[0];\n item.url = bouncex.utils.url.allowParams('modelCode');\n return item;\n}\n\nfunction trackItem() {\n\tvar item;\n\tbouncex.et.onTrue(\n\t\tfunction(){\n\t\t\titem = buildItem();\n\n\t\t\treturn item.id && item.copy && item.imageurl;\n\t\t}, \n\t\tfunction(){\n trackPdpAddToCart(item.id);\n\t\t\ttrackTradeIn(item.id);\n\t\t\tif (bouncex.vars.ibx_prev_id === item.id) { return; }\n bouncex.push(['item', item]);\n bouncex.setVarAndReload('ibx_prev_id', item.id);\n var pushData = {\n 'item:id': item.id,\n 'item:itemgroupid': item.id\n };\n bouncex.push(['view item', pushData]);\n pushData['item:feedid'] = item.id;\n bouncex.push(['select_sku', pushData]);\n\t\t}, \n\t10);\n}\n\nfunction trackTradeIn(itemId){\n\tbouncex.et.onVarChange('trade_in_device_discount', function(){\n\t\tvar price = jQuery('div.totalPrice strong:first').text().split(' ')[0].replace(/[^0-9.]/g,'');\n\t\tif(price){\n\t\t\tbouncex.push(['select_tradein', {\n\t\t\t\t'item:id': itemId,\n\t\t\t\t'item:price': price,\n\t\t\t}]);\n\t\t}\n\t\t// reapplying atc listener since seems to get removed at this point \n\t\ttrackPdpAddToCart(itemId);\n\t});\n}\n\n/*************** Category Tracking ***************/\nfunction getItemsIds() {\n\treturn jQuery('section[class^=\"ProductCard-root\"], div[class^=\"ProductCard__container\"], div.product-card-v2__item')\n\t\t.map(function() {\t\n var itemId = jQuery(this).attr('data-modelcode') || jQuery(this).attr('data-mdlcode') || jQuery(this).find('.pd-wishlist-cta').attr('data-modelcode') || '';\n\n if(itemId) {\n return itemId.toUpperCase();\n }\n\t\t}).toArray().join(',');\n}\n\nfunction trackCategory(){\n\tvar itemIds = getItemsIds();\n\n\tif(itemIds && itemIds.length){\n\t\tbouncex.push(['view category', {\n\t\t\t'items:ids': itemIds,\n\t\t\t'page:url': bouncex.utils.url.allowParams('listType searchTerm'),\n\t\t}]);\n\t}\n}\n\nfunction trackAddOns(){\n\tif (bouncex.utils.url.allowParams().indexOf(\"/redemption/\") < 0) {\n\t\treturn;\n\t}\n\n\tvar addOnIds = [];\n\n\tbouncex.et.on(jQuery(document), \"click.bx\", function(e) {\n\t\tvar $target = jQuery(e.target),\n\t\t\ttargetClass = $target.attr(\"class\") || \"\",\n\t\t\t$clickedCard = $target.parents(\".pallete-addon-card\"),\n\t\t\tclickedItemId = $clickedCard.attr(\"data-value\")|| \"\";\n\n\t\t// adds to array if card has been clicked and it is not the color circle selector\n\t\tif ($clickedCard.length && !$target.hasClass(\"outer-circle\") && clickedItemId) {\n\t\t\t// if class is not \"selected\" at time of click, we know it is now being added to the cart. If it is selected, user is removing\n\t\t\tif ($clickedCard.hasClass(\"selected\")) {\n\t\t\t\tvar indexOfItemToRemove = addOnIds.indexOf(clickedItemId);\n\t\t\t\tif (indexOfItemToRemove > -1) {\n\t\t\t\t\taddOnIds.splice(indexOfItemToRemove, 1);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\taddOnIds.push(clickedItemId);\n\t\t\t}\n\t\t}\n\n\t\tif (targetClass.indexOf(\"continue\") > -1 && addOnIds) {\n\t\t\tvar idsToAdd = bouncex.vars.ibx_atc_id ? bouncex.vars.ibx_atc_id + \",\" : \"\" + addOnIds.join(\",\");\n\t\t\tbouncex.setVarAndReload('ibx_atc_id', idsToAdd);\n\t\t}\n\t});\n}\n/******** start Add To Cart tracking *********/\nfunction fireAddToCart(itemId, cartObj) {\n\tbouncex.push(['add to cart', {\n\t\t'item:id': itemId,\n\t\t'cart:item': cartObj || ''\n\t}]);\n\n\tif(!bouncex.vars.cart_set){\n\t\tbouncex.setVarAndReload('cart_set', true);\n\t}\n}\n\nfunction trackPdpAddToCart(itemId){\n\t\n\tjQuery(document).on('click.bx', jQuery('a:contains(\"BUY NOW\"), a:contains(\"ADD TO CART\"), .button.CONTINUE, .button:contains(Continue)'), function(){\n\t bouncex.log(\"clicking atc on pdp\", itemId);\n\t\t if(itemId){\n\t\t\t bouncex.setVarAndReload('ibx_atc_id', itemId);\n\t\t }\n\t})\n}\n// firing add to cart when land on cart or checkout page because replen info is only available here\nfunction trackAddedToCart() {\n\tvar itemIds = bouncex.vars.ibx_atc_id || \"\",\n\t\tcartObj = {},\n\t\titemsArr = [],\n\t\tidsToAdd = itemIds.split(\",\");\n\n\t// get cart info from window to creat cart:item object \n\tif(window.createdCart && idsToAdd.length){\n\t bouncex.log(\"window.createdCart && idsToAdd.length\")\n\t\twindow.createdCart.then(function(res){\n\t\t\tvar cartData = res.data,\n\t\t\t\tatcItems = cartData.line_items,\n\t\t\t\tpromoCodes = cartData.coupon_codes;\n\n\t\t\tfor (var key in atcItems) {\n\t\t\t\tvar el = atcItems[key],\n\t\t\t\t\titemObj = {},\n\t\t\t\t\taddOnItems = el.line_items;\n\n\t\t\t\titemObj.sku = el.sku_id;\n\t\t\t\titemObj.exchangeId = el.exchange_id || '';\n\t\t\t\titemObj.addOns = [];\n\n\t\t\t\tfor (var k in addOnItems) {\n\t\t\t\t\tvar addOnEl = addOnItems[k],\n\t\t\t\t\t\taddOnItemObj = {};\n\t\t\t\t\t\n\t\t\t\t\tif(addOnEl.attributes.product_type === 'Physical'){\n\t\t\t\t\t\taddOnItemObj.sku = addOnEl.sku_id;\n\t\t\t\t\t\titemObj.addOns.push(addOnItemObj);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\titemsArr.push(itemObj);\n\t\t\t}\n\t\t\tcartObj.promoCodes = promoCodes;\n\t\t\tcartObj.items = itemsArr;\n\n\t\t\tfor (var i = 0; i < idsToAdd.length; i++) {\n\t\t\t\tvar itemId = idsToAdd[i];\n\t\t\t\tif (itemId) {\n\t\t\t\t\tfireAddToCart(itemId, JSON.stringify(cartObj));\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}\n\n\tbouncex.setVarAndReload('ibx_atc_id', false);\n}\n\n/*************** Empty Cart Tracking ***************/\nfunction trackEmptyCart() {\n\tbouncex.et.onVarChange('cart_qty', function(){\n\t\tif (bouncex.vars.cart_set && bouncex.vars.cart_qty === 0) {\n\t\t\tbouncex.push(['empty_cart', {}]);\n\t\t\tbouncex.setVarAndReload('cart_set', false);\n\t\t\tbouncex.setVarAndReload('ibx_cart_obj', '{}');\n\t\t}\n\t});\n}\n\n/*************************** CART REPLENISHMENT ****************************/\nfunction replenish(cart) {\n\tif(cart.items && cart.items.length){\n\t\tvar cartObj = cart.items[0],\n\t\t\tdeferreds = [],\n\t\t\tcouponString,\n\t\t\treplenString,\n\t\t\treplenUrl;\n\t\n\t\tcartObj.items.forEach(function(item) {\n\t\t\tvar parentSku = item.sku,\n\t\t\t\texchangeId = item.exchangeId,\n\t\t\t\texcahngeString = exchangeId ? '&exchange_id=' + exchangeId + ',' + parentSku + ',1' : '',\n\t\t\t\taddOns = item.addOns,\n\t\t\t\taddOnString = '',\n\t\t\t\titemString = 'addItem[]=' + parentSku + ',1' + excahngeString;\n\n\t\t\tif(addOns.length) {\n\t\t\t\taddOns.forEach(function(addOn){\n\t\t\t\t\tvar sku = addOn.sku;\n\t\t\t\t\taddOnString = '&addChildItem[]=' + sku + ',' + parentSku + ',1';\n\t\t\t\t\titemString = itemString + addOnString;\n\t\t\t\t});\n\t\t\t}\n\t\t\tdeferreds.push(itemString);\n\t\t});\n\t\n\t\tif(deferreds.length){\n\t\t\treplenString = deferreds.join('&');\n\t\t\t// need example from client with coupons applied to ensure we know how to append \n\t\t\t// couponString = cartObj.promoCodes.length ? '&coupon_codes=' + cartObj.promoCodes : '';\n\t\t\t// replenUrl = REPLEN_BASE_URL + couponString + '&' + replenString;\n\t\t\treplenUrl = REPLEN_BASE_URL + '&' + replenString;\n\t\t\twindow.location.href = replenUrl + '&bx_replen=true';\n\t\t}\n\t}\n}\n\nfunction trackLoggedInUser() {\n\tif (!bouncex.vars.logged_in) {\n\t\treturn;\n\t}\n\n\ttrackPanda();\n\n\tif(!bouncex.vars.logged_in_identified){\n\t\tvar userId = bouncex.utils.cookies.read('prof_bpno_s');\n\n\t\tif(userId){\n\t\t\tbouncex.push(['user', {\n\t\t\t\t'forceUserEvent': true,\n\t\t\t\t'espemailid': userId,\n\t\t\t\t'source': 'cookie-email-id'\n\t\t\t}]);\n\t\t\tbouncex.setVarAndReload('logged_in_identified', true);\n\t\t}\n\t}\n}\n\nfunction trackEPPUser(){\n \n if(bouncex.vars.employee_logged_in){\n bouncex.push(['epp_user', {}]);\n\t\tbouncex.setVarAndReload('epp_identified', true);\n\t\treturn;\n }\n \n if(!bouncex.vars.epp_verified){\n return;\n }\n \n \n if(!bouncex.vars.epp_identified){\n bouncex.push(['epp_user', {}]);\n\t\tbouncex.setVarAndReload('epp_identified', true);\n }\n}\n\n\nfunction trackPanda() {\n\tvar cookieVal = bouncex.utils.getNestedProp(\"sessionStorage.tgt_pzn_config_sets\", \"\");\n\tif (!bouncex.vars.panda_fired && cookieVal.indexOf(\"s21_panda\") > -1) {\n\t\tbouncex.push([\"view_panda\", {}]);\n\t\tbouncex.setVarAndReload(\"panda_fired\", true);\n\t}\n}\n\n/******** itiniate tracking code *********/\nif (isValidDomain() && isEnglish()) {\n bouncex.et.cart.init({\n\t\treplenish: replenish,\n\t\treplenishmentType: 'ajax'\n\t});\n\ttrackLoggedInUser();\n\ttrackAddOns();\n\ttrackEPPUser();\n\n\tswitch (getPageType()) {\n\t\tcase 'product':\n\t\t\ttrackItem();\n\t\t\tbreak;\n\t\tcase 'category':\n\t\tcase 'search':\n\t\t\ttrackCategory();\n\t\t\tbreak;\n\t\tcase 'cart':\n\t\tcase 'checkout':\n\t\t\ttrackAddedToCart();\n\t\t\ttrackEmptyCart();\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tbreak;\n\t}\n}\n","dge":true,"bxidLoadFirst":false,"pie":true,"cme":true,"gbi_enabled":0,"bpush":false,"pt":{"cart":{"testmode":false,"val":[[{"activation":"current_page_url","prop":"contains","prop2":"","prop3":"","val":"/cart"}],[{"activation":"current_page_url","prop":"not_contains","prop2":"","prop3":"","val":".ecom-qa."}]]},"category":{"testmode":false,"val":[[{"activation":"js","prop":"","prop2":"","prop3":"","val":"document.querySelectorAll('[itemtype=\"http://schema.org/SomeProducts\"], .filter-sort.section').length > 0;"},{"activation":"js","prop":"","prop2":"","prop3":"","val":"bouncex.utils.getNestedProp('utag.data.page_type') === 'product explore';"},{"activation":"js","prop":"","prop2":"","prop3":"","val":"window.location.pathname.split('/').length === 4 && window.location.pathname.lastIndexOf('s/') === window.location.pathname.length-2;"},{"activation":"current_page_url","prop":"exactly","prop2":"","prop3":"","val":"https://www.samsung.com/us/smartphones/offers/work-and-wellness-pack/"}],[{"activation":"current_page_url","prop":"not_contains","prop2":"","prop3":"","val":"/buy/"}],[{"activation":"js","prop":"","prop2":"","prop3":"","val":"document.querySelectorAll('.bundle-details-right').length === 0;"}],[{"activation":"current_page_url","prop":"not_exactly","prop2":"","prop3":"","val":"https://www.samsung.com/us/watches/create-your-watch/"}],[{"activation":"js","prop":"","prop2":"","prop3":"","val":"!window.phones_data && document.querySelectorAll('.s-active [data-link_id=\"top_highlights\"]').length === 0;"}]]},"checkout":{"testmode":false,"val":[[{"activation":"current_page_url","prop":"contains","prop2":"","prop3":"","val":"/checkout"}]]},"home":{"testmode":false,"val":[[{"activation":"js","prop":"","prop2":"","prop3":"","val":"document.querySelectorAll('link[rel=\"canonical\"][href=\"https://www.samsung.com/us/\"]').length > 0;"}],[{"activation":"current_page_url","prop":"not_contains","prop2":"","prop3":"","val":"/notfound"}],[{"activation":"current_page_url","prop":"not_contains","prop2":"","prop3":"","val":"/rebate-center"}],[{"activation":"current_page_url","prop":"not_contains","prop2":"","prop3":"","val":"/support/repair"}]]},"product":{"testmode":false,"val":[[{"activation":"js","prop":"","prop2":"","prop3":"","val":"document.querySelectorAll('[itemtype=\"http://schema.org/Product\"], .bundle-details-right, [itemtype=\"http://schema.org/SomeProducts\"] .carrierRedesign, [itemtype=\"https://schema.org/IndividualProduct\"]').length > 0;"},{"activation":"js","prop":"","prop2":"","prop3":"","val":"(document.querySelectorAll('#device_top,#model_top').length > 0 || window.location.href.indexOf('modelCode=') > -1) && window.location.href.indexOf('/buy') > -1;"},{"activation":"current_page_url","prop":"exactly","prop2":"","prop3":"","val":"https://www.samsung.com/us/watches/create-your-watch/"},{"activation":"js","prop":"","prop2":"","prop3":"","val":"!!window.phones_data && document.querySelectorAll('.s-active [data-link_id=\"top_highlights\"]').length > 0;"},{"activation":"current_page_url","prop":"contains","prop2":"","prop3":"","val":"/buy"}]]},"search":{"testmode":false,"val":[[{"activation":"current_page_url","prop":"contains","prop2":"","prop3":"","val":"/search"}],[{"activation":"current_page_url","prop":"not_contains","prop2":"","prop3":"","val":"/search-orders"}]]}},"els":{"CART - Checkout Button":"","CART - Promo Code Apply Button":"","CART - Promo Code Box":"","CAT - Product Grid Image":"","CAT - Quickview Box":"","CAT-AddtoCartButton":"","CAT-QuickviewAddtoCart":"","Footer":"","Navigation bar":"","PDP - Add to Cart Button":"","PDP - Color Option":"","PDP - Hero Image":"","PDP - Product Name":"","PDP - Product Price":"","PDP - Quantity Option":"","PDP - Review Stars":"","PDP - Size Option":"","PDP - Thumbnail Image":"","SEARCH - Product Grid Image":""},"vars":[{"name":"logged_in","polling":"none","persist":"no","page_types":[],"testmode":false,"default":"false","code":"jQuery('.before-login.hide').length > 0;","trigger":""},{"name":"ever_logged_in","polling":"none","persist":"permanent","page_types":[],"testmode":false,"default":"false","code":"bouncex.vars.logged_in ? true : null;","trigger":""},{"name":"cart_qty","polling":"all","persist":"no","page_types":[],"testmode":false,"default":"0","code":"(function(){\n if(bouncex.website.pts === 'cart'){\n if(jQuery('.ec-empty-cart-msg-holder').is(':visible')) {\n return 0;\n }\n return jQuery('.ec-cart-parent-item-holder').length + jQuery('.ec-cart-child-item-holder:not(.upgrade-child-item)').length;\n }\n\n var selector = jQuery('.sc-item-count-in-checkout').length > 0 ? jQuery('.sc-item-count-in-checkout') : jQuery('.gnb-cart-count, .gnb__cart-in-number');\n return Number(jQuery(selector).first().text().replace(/[^0-9.]/g, '')) || null;\n})();","trigger":""},{"name":"cart_value","polling":"all","persist":"visit","page_types":[],"testmode":false,"default":"0","code":"(function(){\n if (bouncex.website.pts === 'cart' || bouncex.website.pts === 'checkout') {\n return Number(jQuery('.os-price-row:contains(\"Subtotal\") .os-price-value').text().replace(/[^0-9.]/g, ''));\n } else if (jQuery('.gnb-cart-count, .gnb__cart-in-number').first().text().replace(/[^0-9.]/g, '') === '0') {\n return 0;\n }\n return null;\n})();","trigger":""},{"name":"prod_price","polling":"all","persist":"no","page_types":["product"],"testmode":false,"default":"false","code":"(function(){\n var buyPagePrice = ( \n jQuery('.selected.type-device .price').first().text() || \n jQuery('.header-block.addons_page .price-info b').contents().first().text() || \n jQuery('.header-wrapper p:contains(\"Total\")').contents().first().text() \n ).replace(/[^0-9.]/g, '');\n var prodPagePrice = (\n jQuery('.product-details__info [itemprop=\"price\"]:contains(\"Current Price\")').text() || \n jQuery('.option-value.selected .epp-price:contains(\"Current Price\")').text() ||\n jQuery('.active .epp-price').text()\n ).replace(/[^0-9.]/g, '');\n var bundlePagePrice = jQuery('.bundle-container .total-price').first().text().replace(/[^0-9.]/g, '');\n var createPagePrice = jQuery('.info-section .sales-price').text().replace(/[^0-9.]/g, '');\n return createPagePrice || buyPagePrice || prodPagePrice || bundlePagePrice || false;\n})();","trigger":""},{"name":"prod_name","polling":"all","persist":"visit","page_types":[],"testmode":false,"default":"false","code":"(function () {\n if (jQuery('.titleHeader .title').length) {\n return jQuery('.titleHeader .title').text();\n } else if (jQuery('[class*=\"ProductTitle_product\"]').length) {\n return jQuery('[class*=\"ProductTitle_product\"]').text();\n } else if (jQuery('.title-wrapper h1').length) {\n return jQuery('.title-wrapper h1').text();\n } else if (!!bouncex.utils.getNestedProp('utag_data.product_name')) {\n var prod_name = bouncex.utils.getNestedProp('utag_data.product_name');\n if (Array.isArray(prod_name)) {\n prod_name = prod_name[0];\n }\n return prod_name;\n } else {\n return bouncex.utils.getNestedProp('phones_data.product_name', false);\n }\n})();","trigger":""},{"name":"in_stock","polling":"all","persist":"no","page_types":[],"testmode":false,"default":"false","code":"bouncex.website.pts === 'product' && jQuery('.option-value.selected[data-stock=\"N\"]').length === 0 && jQuery('.product-details__info-results[data-stock=\"N\"]').length === 0","trigger":""},{"name":"submitted_onsite","polling":"none","persist":"no","page_types":[],"testmode":true,"default":"false","code":"","trigger":""},{"name":"item_id_product","polling":"none","persist":"no","page_types":["product"],"testmode":true,"default":"false","code":"","trigger":""},{"name":"item_id_quickview","polling":"none","persist":"no","page_types":[],"testmode":true,"default":"false","code":"","trigger":"event"},{"name":"item_id_hover","polling":"none","persist":"no","page_types":[],"testmode":true,"default":"false","code":"","trigger":"event"},{"name":"items_ids","polling":"none","persist":"no","page_types":["category","search"],"testmode":true,"default":"false","code":"","trigger":""},{"name":"item_url","polling":"none","persist":"no","page_types":["product"],"testmode":true,"default":"false","code":"","trigger":""},{"name":"item_image_url","polling":"none","persist":"no","page_types":["product"],"testmode":true,"default":"false","code":"","trigger":""},{"name":"item_category","polling":"none","persist":"no","page_types":["product"],"testmode":true,"default":"false","code":"","trigger":""},{"name":"item_price","polling":"none","persist":"no","page_types":["product"],"testmode":true,"default":"false","code":"","trigger":""},{"name":"item_in_stock","polling":"none","persist":"no","page_types":["product"],"testmode":true,"default":"false","code":"","trigger":""},{"name":"page_url","polling":"none","persist":"no","page_types":["category","search"],"testmode":true,"default":"false","code":"","trigger":""},{"name":"page_title","polling":"none","persist":"no","page_types":["category"],"testmode":true,"default":"false","code":"","trigger":""},{"name":"item_copy","polling":"none","persist":"no","page_types":["product"],"testmode":true,"default":"false","code":"","trigger":"pageload"},{"name":"cart_token","polling":"none","persist":"no","page_types":[],"testmode":true,"default":"false","code":"null;","trigger":"pageload"},{"name":"cart_items","polling":"all","persist":"visit","page_types":[],"testmode":false,"default":"false","code":"(function () {\n if (bouncex.website.pts === 'cart') {\n var items = jQuery('.ec-cart-parent-meta-details [ecom-data-link_position]');\n var skuList = '';\n items.each(function() {\n if (skuList.length > 0) {\n skuList += ' ';\n }\n skuList += jQuery(this).attr('ecom-data-link_position');\n });\n return skuList === '' ? false : skuList;\n }\n return null;\n})();","trigger":"pageload"},{"name":"wknd_cart_image","polling":"none","persist":"no","page_types":[],"testmode":false,"default":"false","code":"bouncex.utils.getNestedProp('utag.data.product_image');","trigger":"pageload"},{"name":"cookie_modal_present","polling":"all","persist":"no","page_types":[],"testmode":false,"default":"false","code":"jQuery('.cookie-bar__msg-wrap:visible').length > 0;","trigger":"pageload"},{"name":"ibx_cart_obj","polling":"none","persist":"visit","page_types":[],"testmode":false,"default":"false","code":"null;","trigger":"pageload"},{"name":"cart_set","polling":"none","persist":"visit","page_types":[],"testmode":false,"default":"false","code":"null;","trigger":"pageload"},{"name":"ibx_prev_id","polling":"none","persist":"visit","page_types":[],"testmode":false,"default":"false","code":"null;","trigger":"pageload"},{"name":"ibx_prev_sku","polling":"none","persist":"visit","page_types":[],"testmode":false,"default":"false","code":"null;","trigger":"pageload"},{"name":"ibx_atc_id","polling":"none","persist":"permanent","page_types":[],"testmode":false,"default":"false","code":"null;","trigger":"pageload"},{"name":"cart","polling":"none","persist":"visit","page_types":[],"testmode":false,"default":"false","code":"null;","trigger":"pageload"},{"name":"product_subcategory","polling":"none","persist":"no","page_types":[],"testmode":false,"default":"false","code":"(function(){\n if (window.phones_data && window.phones_data.product_subcategory) {\n return phones_data.product_subcategory;\n } \n else if (window.utag_data && window.utag_data.product_subcategory) {\n return utag_data.product_subcategory[0];\n } else if (!!bouncex.calling_url.split('%2F').find(i => i === 'smartphones')) {\n return 'Phones';\n }\n return false;\n})();","trigger":"pageload"},{"name":"phone_name","polling":"all","persist":"no","page_types":[],"testmode":false,"default":"false","code":"(function () {\n if (jQuery('.titleHeader .title').length) {\n return jQuery('.titleHeader .title').text();\n } else if (jQuery('[class*=\"ProductTitle_product\"]').length) {\n return jQuery('[class*=\"ProductTitle_product\"]').text();\n } else if (jQuery('.title-wrapper h1').length) {\n return jQuery('.title-wrapper h1').text();\n } else if (!!bouncex.utils.getNestedProp('utag_data.product_name')) {\n var prod_name = bouncex.utils.getNestedProp('utag_data.product_name');\n if (Array.isArray(prod_name)) {\n prod_name = prod_name[0];\n }\n return prod_name;\n } else {\n return bouncex.utils.getNestedProp('phones_data.product_name', false);\n }\n})();","trigger":"pageload"},{"name":"phone_image_url","polling":"all","persist":"no","page_types":[],"testmode":false,"default":"false","code":"(function() {\n if (!!bouncex.utils.getNestedProp('phones_data.product_image', false) && bouncex.utils.getNestedProp('phones_data.product_image') !== '') {\n return bouncex.utils.getNestedProp('phones_data.product_image');\n } else if (!!bouncex.utils.getNestedProp('utag_data.product_image', false) && bouncex.utils.getNestedProp('utag_data.product_image') !== '') {\n return bouncex.utils.getNestedProp('utag_data.product_image');\n } else if (jQuery('[class*=\"GalleryTemplateB_selectedImageWrapper\"] img').length > 0) {\n return jQuery('[class*=\"GalleryTemplateB_selectedImageWrapper\"] img').attr('src');\n } else if (jQuery('.gallery-swipe img:first').length) {\n return jQuery('.gallery-swipe img:first').attr('src');\n } else {\n return false;\n }\n})();","trigger":"pageload"},{"name":"trade_in_device_brand","polling":"all","persist":"no","page_types":["product"],"testmode":false,"default":"false","code":"(function () {\n if (jQuery('#tradeinContainer').length && !!jQuery('#tradeinContainer').find('[class*=\"BrandDropDown_selectedBrand\"]').text() && jQuery('#tradeinContainer').find('[class*=\"BrandDropDown_selectedBrand\"]').text() !== '') {\n return jQuery('#tradeinContainer').find('[class*=\"BrandDropDown_selectedBrand\"]').text();\n } else if (jQuery('.tradeinOptions').length && !!jQuery('.tradeinOptions').find('input[name=\"brand\"]').val() && jQuery('.tradeinOptions').find('input[name=\"brand\"]').val() !== '') {\n return jQuery('.tradeinOptions').find('input[name=\"brand\"]').val();\n }\n return false;\n})();","trigger":"pageload"},{"name":"trade_in_device_name","polling":"all","persist":"no","page_types":["product"],"testmode":false,"default":"false","code":"(function () {\n var tradeOptions = jQuery('#tradeinContainer');\n if (tradeOptions.find('[class*=\"DeviceDropdown_selectedDevice\"]') && tradeOptions.find('[class*=\"DeviceDropdown_selectedDevice\"]').text() !== '') {\n return tradeOptions.find('[class*=\"DeviceDropdown_selectedDevice\"]').text();\n } else if (jQuery('.tradeinOptions [id*=\"dropdownModel\"]').length && !!jQuery('.tradeinOptions [id*=\"dropdownModel\"]').find('.device-label.device').text()) {\n return jQuery('.tradeinOptions [id*=\"dropdownModel\"]').find('.device-label.device').text();\n }\n return false;\n})();","trigger":"pageload"},{"name":"trade_in_device_image_url","polling":"all","persist":"no","page_types":["product"],"testmode":false,"default":"false","code":"jQuery('.selected-trade .item-img').first().attr('src') || false;\n","trigger":"pageload"},{"name":"trade_in_device_discount","polling":"all","persist":"no","page_types":["product"],"testmode":false,"default":"false","code":"(function () {\n var tradeOptions = jQuery('#tradeinContainer');\n if (!!tradeOptions.find('[class*=\"DeviceDropdown_selectedDevice\"] + [class*=\"DeviceDropdown_midSection\"] + div > span:not([class*=\"DeviceDropdown_strikethroughPrice\"])') && !!tradeOptions.find('[class*=\"DeviceDropdown_selectedDevice\"] + [class*=\"DeviceDropdown_midSection\"] + div > span:not([class*=\"DeviceDropdown_strikethroughPrice\"])').text() && tradeOptions.find('[class*=\"DeviceDropdown_selectedDevice\"] + [class*=\"DeviceDropdown_midSection\"] + div > span:not([class*=\"DeviceDropdown_strikethroughPrice\"])').text() !== '') {\n return tradeOptions.find('[class*=\"DeviceDropdown_selectedDevice\"] + [class*=\"DeviceDropdown_midSection\"] + div > span:not([class*=\"DeviceDropdown_strikethroughPrice\"])').text().trim();\n } else if (jQuery('.tradeinOptions [id*=\"dropdownModel\"]').length && !!jQuery('.tradeinOptions [id*=\"dropdownModel\"]').find('.device-label:not(.device)').text()) {\n return jQuery('.tradeinOptions [id*=\"dropdownModel\"]').find('.device-label:not(.device)').text().trim();\n }\n return false;\n})();","trigger":"pageload"},{"name":"logged_in_identified","polling":"none","persist":"permanent","page_types":[],"testmode":false,"default":"false","code":"null;","trigger":"pageload"},{"name":"product_category","polling":"none","persist":"no","page_types":[],"testmode":false,"default":"false","code":"(function() {\n var pathList = new URL(window.location).pathname.split('/').filter(i => !!i);\n if (pathList[1] === 'smartphones') {\n return 'mobile';\n } else {\n return pathList[1]; \n }\n})();","trigger":"pageload"},{"name":"ecid","polling":"none","persist":"no","page_types":[],"testmode":false,"default":"false","code":"(function(){\n\tif (window.visitor && typeof window.visitor.getMarketingCloudVisitorID === 'function') {\n\t\treturn window.visitor.getMarketingCloudVisitorID(bouncex.utils.getNestedProp('window.visitor.marketingCloudOrgID')) + ' ';\n\t}\n\treturn false;\n})();","trigger":"pageload"},{"name":"pagetype","polling":"none","persist":"no","page_types":[],"testmode":false,"default":"false","code":"bouncex.website.pts;","trigger":"pageload"},{"name":"trade_in_status","polling":"none","persist":"visit","page_types":[],"testmode":false,"default":"false","code":"(function () {\n var selectedOption1 = jQuery('#tradeinContainer #eligibility-condition [class*=\"TradeInEligibilityByCondition_tradein__conditions__selected\"]'),\n selectedOption2 = jQuery('.model-type-panels .model-type-container'),\n selectedOption3 = jQuery('.tradeinOptions');\n if (selectedOption1.length && selectedOption1.find('[class*=\"TradeInEligibilityByCondition_tradein__conditions__label\"]').length) {\n if (selectedOption1.find('[class*=\"TradeInEligibilityByCondition_tradein__conditions__label\"]').text().includes('good')) {\n return 'not_cracked';\n } else {\n return 'cracked';\n }\n } else if (selectedOption2.length && selectedOption2.find('.selected').length) {\n if (selectedOption2.find('.selected').text().includes('good')) {\n return 'not_cracked';\n } else {\n return 'cracked';\n }\n } else if (selectedOption3.length && selectedOption3.find('.selected').length) {\n if (selectedOption3.find('.selected').text().includes('Good')) {\n return 'not_cracked';\n } else {\n return 'cracked';\n } \n }\n return false;\n})();","trigger":"pageload"},{"name":"cart_product_family","polling":"all","persist":"visit","page_types":[],"testmode":false,"default":"false","code":"(function() {\n if (bouncex.website.pts === 'cart') {\n var items = jQuery('.ec-cart-parent-meta-details [ecom-data-link_position]'),\n prodFamily = [];\n for (var i = 0; i < items.length; i++) {\n var current = jQuery(items[i]).attr('href').split('/')[3];\n prodFamily.push(current);\n }\n return prodFamily.join(', ');\n }\n return null;\n})();","trigger":"pageload"},{"name":"zip_code_found","polling":"vars","persist":"no","page_types":[],"testmode":false,"default":"false","code":"(function() {\n var zipInCookie = bouncex.utils.cookies.read('HA-Deeplink-Zipcode') || '';\n if (zipInCookie.length > 0) {\n /* prevents zips starting with 0 from getting cut off */\n return zipInCookie + ' ';\n }\n return false;\n})();","trigger":"pageload"},{"name":"shipzip_code_found","polling":"all","persist":"visit","page_types":[],"testmode":false,"default":"false","code":"(function() {\n var $shippingZipcode = jQuery('.loc-zip-code.update-shipping input[name=\"postalCode\"]'),\n $billingZipcode = jQuery('#_billingaddressInfo_userZipCode'),\n zipcode = null;\n\n if ($shippingZipcode.length > 0 && $shippingZipcode.val().length === 5) {\n zipcode = $shippingZipcode.val();\n } else if ($billingZipcode.length > 0 && $billingZipcode.val().length === 5) {\n zipcode = $billingZipcode.val();\n }\n\n return typeof zipcode === 'string' && zipcode[0] === '0' ? zipcode + ' ' : zipcode;\n})();\n","trigger":"pageload"},{"name":"loyalty_status","polling":"all","persist":"no","page_types":[],"testmode":false,"default":"false","code":"(function(){\n switch (true){\n case typeof Q2B2Reserve !== 'undefined' && Q2B2Reserve === '1':\n return 'reserver';\n case typeof Q2B2Loyalist !== 'undefined' && Q2B2Loyalist === '1' && (typeof Q2B2Reserve === 'undefined' || (typeof Q2B2Reserve !== 'undefined' && Q2B2Reserve !== '1')):\n return 'loyalist';\n default:\n return false;\n }\n})();","trigger":"pageload"},{"name":"carrier_selected","polling":"all","persist":"no","page_types":[],"testmode":false,"default":"false","code":"(function () {\n var $attr = jQuery('.v2.row-container .tile7.type-carrier.selected').attr('id') || false,\n tileId = jQuery('[class*=\"CarrierTile_fourTileRow\"][class*=\"CarrierTile_selected\"]').attr('id') || false;\n\n if (!!tileId) {\n return tileId;\n } else {\n switch ($attr) {\n case 'att':\n return 'AT&T';\n case 't-mobile':\n return 'T-Mobile';\n case 'us-cellular':\n return 'US-Cellular';\n case 'verizon':\n return 'Verizon';\n default:\n return false;\n }\n }\n})();","trigger":"pageload"},{"name":"panda_fired","polling":"none","persist":"visit","page_types":[],"testmode":false,"default":"false","code":"null;","trigger":"pageload"},{"name":"reserve_complete","polling":"all","persist":"permanent","page_types":[],"testmode":false,"default":"false","code":"(function() {\n if (jQuery(\".mobileReserve__thankYou:visible\").length > 0) {\n return true;\n }\n})();","trigger":"pageload"},{"name":"first_cart_image","polling":"none","persist":"no","page_types":[],"testmode":false,"default":"false","code":"(function () {\n\tvar $cartImages,\n\t\t$checkoutImages = jQuery('.os-mini-prd-photo img');\n\n\tif ($checkoutImages.length > 0) {\n\t\treturn $checkoutImages.first().attr('src') || false;\n\t}\n\n\t$cartImages = jQuery('figure.ec-cart-item-photo img');\n\n\tif ($cartImages.length > 0) {\n\t\treturn $cartImages.first().attr('src') || false;\n\t}\n\n\treturn false;\n})();","trigger":"pageload"},{"name":"cart_discount_total","polling":"all","persist":"visit","page_types":[],"testmode":false,"default":"false","code":"(function() {\n if (bouncex.website.pts === 'cart') {\n return Number(jQuery('.total-savings-row .os-price-value').text().trim().replace(/[^0-9.]/g, ''));\n }\n return null;\n})();","trigger":"pageload"},{"name":"epp_verified","polling":"none","persist":"permanent","page_types":[],"testmode":false,"default":"false","code":"(function() {\n return bouncex.utils.cookies.read('epp_verified') === 'true' || false;\n})();","trigger":"pageload"},{"name":"epp_identified","polling":"none","persist":"visit","page_types":[],"testmode":false,"default":"false","code":"null;","trigger":"pageload"},{"name":"reserve_monitor","polling":"all","persist":"permanent","page_types":["product"],"testmode":false,"default":"false","code":"jQuery('.reserve_thankyou').css(\"display\") === \"block\" || null;","trigger":"pageload"},{"name":"employee_logged_in","polling":"all","persist":"visit","page_types":[],"testmode":false,"default":"false","code":"!!bouncex.getBounceCookie('tmktid') ? true : false;","trigger":"pageload"},{"name":"carrier_banner","polling":"all","persist":"no","page_types":[],"testmode":false,"default":"false","code":"jQuery('.promotionBanner .header').first().text().toLowerCase().indexOf('special carrier offers') > -1;","trigger":"pageload"},{"name":"ha_is_available","polling":"all","persist":"no","page_types":[],"testmode":false,"default":"false","code":"jQuery('#ha-success[style*=\"display: block\"] .zipCode__wrapper p:first').text().indexOf('This product is available for delivery in your area') > -1;","trigger":"pageload"},{"name":"ha_get_by_date","polling":"all","persist":"no","page_types":[],"testmode":false,"default":"false","code":"jQuery('#ha-success[style*=\"display: block\"]').length > 0 ? jQuery('#ha-zipCode-text b').first().text().trim() : false;","trigger":"pageload"},{"name":"metrical_cookie","polling":"all","persist":"no","page_types":[],"testmode":false,"default":"false","code":"\nbouncex.utils.cookies.read('MetricalTest') === 'true';","trigger":"pageload"},{"name":"samsung_care","polling":"none","persist":"no","page_types":[],"testmode":true,"default":"false","code":"null;","trigger":"pageload"},{"name":"cart_items_names","polling":"all","persist":"no","page_types":[],"testmode":false,"default":"false","code":"(function () {\n var items, prodList;\n if (bouncex.website.pts === 'cart') {\n items = jQuery('.ec-cart-parent-meta-details [ecom-data-link_position]');\n prodList = [];\n items.each(function() {\n prodList.push(jQuery(this).find('span').text());\n });\n return prodList.length === 0 ? false : prodList.join(\" | \");\n } else if (bouncex.website.pts === 'checkout') {\n items = jQuery('.os-mini-prd-parent-holder');\n prodList = [];\n items.each(function() {\n prodList.push(jQuery(this).find('.os-mini-prd-name').text());\n });\n return prodList.length === 0 ? false : prodList.join(\" | \");\n }\n return null;\n})();","trigger":"pageload"},{"name":"samsung_popup_test","polling":"all","persist":"visit","page_types":[],"testmode":false,"default":"false","code":"(function() {\n function getCookie(name) { \n var re = new RegExp(name + \"=([^;]+)\"); \n var value = re.exec(document.cookie); \n return (value !== null) ? unescape(value[1]) : null; \n }\n \n return getCookie('SamsungPopupTest');\n})();","trigger":"pageload"},{"name":"native_popup_visible","polling":"all","persist":"no","page_types":["cart"],"testmode":false,"default":"false","code":"jQuery('.tgt-popup-container.show').length > 0;","trigger":"pageload"}],"dgu":"pixel.cdnwidget.com","dgp":false,"ba":{"enabled":0,"fbte":0},"biu":"assets.bounceexchange.com","bau":"api.bounceexchange.com","beu":"events.bouncex.net","ibx":{"tjs":"","cjs":"","miw":1,"mibcx":1,"te":1,"cart_rep":{"get":"","set":""},"ulpj":{"MKM_RID":"espemailid"},"cus":"","miw_exclude":"","enabled":1},"etjson":null,"osre":true,"osru":"osr.bounceexchange.com/v1/osr/items","checkDfp":false,"gamNetwork":"","spa":1,"spatm":0,"preinit_cjs":"if(bouncex.testmode.bxdev){\n SinglePageApp.setCustomParams({\n currentPageIdentifier: function() {\n if(bouncex.website.pts === \"product\"){\n var $skuText = jQuery('.flexRowContainer .sku').text();\n if($skuText !== \"\"){\n return $skuText.indexOf('/') > -1 ? $skuText.split('/')[1].trim() : $skuText.text();\n } \n return jQuery('.product-details__info-sku:visible').text().trim() || jQuery('p[class^=\"Header_sku_\"]').text().trim();\n }\n \n return window.location.href;\n }\n });\n}","crs":{"integrations":null,"pageCount":null},"mat":0,"math":0,"cpnu":"coupons.bounceexchange.com","dfpcms":0,"sms":{"optm":"","eventSharing":false,"shqId":"","enabled":0},"pde":true,"fmc":["US","CA"],"fme":true,"fmx":"","sdk":{"android":{"enabled":true,"enabledVersions":["1.0.8","1.1.0","1.1.4","1.2.0","1.2.1","1.2.2","1.2.5","1.3.0","1.3.2","1.3.3"],"eventModifications":[]},"ios":{"enabled":true,"enabledVersions":["1.0.8","1.1.0","1.1.4","1.2.0","1.2.5","1.3.0","1.3.2","1.3.3"],"eventModifications":[]}},"onsite":{"enabled":1},"ads":{"enabled":0},"pubs":{"enabled":0},"websdk":{"enabled":0},"ga4_property_id":"","ga4_measurement_id":""} ; bouncex.tag = 'tag3'; bouncex.$ = window.jQuery; bouncex.env = 'production'; bouncex.restrictedTlds = {"casl":{"ca":1},"gdpr":{"ad":1,"al":1,"at":1,"ax":1,"ba":1,"be":1,"bg":1,"by":1,"xn--90ais":1,"ch":1,"cy":1,"cz":1,"de":1,"dk":1,"ee":1,"es":1,"eu":1,"fi":1,"fo":1,"fr":1,"uk":1,"gb":1,"gg":1,"gi":1,"gr":1,"hr":1,"hu":1,"ie":1,"im":1,"is":1,"it":1,"je":1,"li":1,"lt":1,"lu":1,"lv":1,"mc":1,"md":1,"me":1,"mk":1,"xn--d1al":1,"mt":1,"nl":1,"no":1,"pl":1,"pt":1,"ro":1,"rs":1,"xn--90a3ac":1,"ru":1,"su":1,"xn--p1ai":1,"se":1,"si":1,"sj":1,"sk":1,"sm":1,"ua":1,"xn--j1amh":1,"va":1,"tr":1}}; bouncex.client = { supportsBrotli: 0 }; bouncex.assets = {"ads":"0109586821763416266dd874f087ef69","creativesBaseStyles":"a53944a2","inbox":"749c9ccd613f1a40075d1e7b59caea42","onsite":"0e56ab6ba004ee080ce3deb3edae35e9","sms":"e39203556bab2366e56296ce42e974a7","websdk":"0704dae1eb637cbeb4a847506058402d"}; bouncex.push = function(pushData) { bouncex.pushedData.push(pushData); } var runtime = document.createElement('script'); runtime.setAttribute('src', '//assets.bounceexchange.com/assets/smart-tag/versioned/runtime_6459738026535cda4232dc813c61447d.js'); runtime.setAttribute('async', 'async'); runtime.setAttribute('onload', 'bouncex.initializeTag()'); bouncex.initializeTag = function() { var script = document.createElement('script'); script.setAttribute('src', '//assets.bounceexchange.com/assets/smart-tag/versioned/main-v2_f63930b37a25405c0fe14c50976210bb.js'); script.setAttribute('async', 'async'); document.body.appendChild(script); var deviceGraphScript = document.createElement('script'); deviceGraphScript.setAttribute('src', '//assets.bounceexchange.com/assets/smart-tag/versioned/cjs_min_3a843477d8e318f67237a66d0a58c542.js'); deviceGraphScript.setAttribute('async', 'async'); var dgAttrs = [{"Key":"id","Value":"c.js"},{"Key":"async","Value":"true"},{"Key":"data-apikey","Value":"2^HIykD"},{"Key":"data-cb","Value":"bouncex.dg.initPostDeviceGraph"},{"Key":"data-bx","Value":"1"},{"Key":"data-gm","Value":"1"},{"Key":"data-fire","Value":"1"}]; if (dgAttrs) { for (var i = 0; i < dgAttrs.length; i++) { deviceGraphScript.setAttribute(dgAttrs[i].Key, dgAttrs[i].Value); } } document.body.appendChild(deviceGraphScript); bouncex.initializeTag = function() {}; }; document.body.appendChild(runtime); } } if (document.readyState === "loading") { document.addEventListener("DOMContentLoaded", bxBootstrap); } else { bxBootstrap(); }})();