(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":3212,"name":"One Kings Lane","cookie_name":"bounceClientVisit3212","domain":"onekingslane.com","ct":"bind_to_domain","ally":0,"ei":0,"tcjs":"","cjs":"/* Wrike: https://www.wrike.com/open.htm?id=477853130 Client using window.gtag (new Google Analytics) */\n/*\n bouncex.report_ga = function(action,label,bypass){\n bypass = typeof(bypass)!='undefined' && !!bypass;\n if(typeof(action)!='string'||typeof(label)!='string') return;\n var interaction = false;\n // enforce case convention\n if(!bypass) {\n action = action.charAt(0).toUpperCase() + action.slice(1).toLowerCase();\n interaction = action=='Impression';\n action = 'BounceX ' + action;\n }\n if (typeof window.gtag === 'function') {\n \n // BELOW EXAMPLES FOR MIGRATING TO GTAG: https://developers.google.com/analytics/devguides/collection/gtagjs/migration#measure_events_with_specified_trackers\n // ga('create', 'GA_MEASUREMENT_ID', 'auto', 'clientTracker');\n // ga('clientTracker.send', 'event', 'Videos', 'play', 'Fall Campaign');\n \n // gtag('event', 'play', {\n // 'send_to': 'GA_MEASUREMENT_ID',\n // 'event_category': 'Videos',\n // 'event_label': 'Fall Campaign'\n // });\n \n \n // ga('trackerName.send', 'event', [eventCategory], [eventAction], [eventLabel], [eventValue], [fieldsObject]);\n // gtag('event', eventName, {\n // 'send_to': 'GA_MEASUREMENT_ID',\n // 'parameter1': 'value1',\n // 'parameter2': 'value2',\n // // ...\n // });\n \n \n // window.ga('create', bouncex.website.gai);\n // window.ga('send', 'event', 'BounceX', action, label, {'nonInteraction':interaction});\n \n \n window.gtag('event', action, {\n 'send_to': bouncex.website.gai,\n 'event_category': 'BounceX',\n 'event_label': label\n });\n \n } else if(typeof window._gaq === 'object') {\n if(bouncex.website.gai){\n window._gaq.push(['_setAccount', bouncex.website.gai]);\n }\n var strippedLabel = label.replace(/\\(|\\)/g, ''); // window._gaq encodes close paren as '1\n window._gaq.push(['_trackEvent','BounceX',action,strippedLabel,,interaction]);\n }\n };\n*/","force_https":false,"waypoints":false,"content_width":900,"gai":"UA-8792844-1","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":2,"map":1,"gar":true,"ete":1,"ettm":false,"etjs":"/** *********** HELPERS **************/\nfunction getUrl(params) {\n return bouncex.utils.url.allowParams(params);\n}\n\nfunction getItemIdFromUrl(url) {\n var noParams = url ? bouncex.utils.url.allowParams([], url) : '';\n return noParams.split('/').pop().replace(/.do$/g, '');\n}\n\nfunction getWunderkindProp(prop) {\n var propToSearchFor = prop ? '.' + prop : '';\n return bouncex.utils.getNestedProp(`wunderkind${propToSearchFor}`, '');\n}\n\n// __NEXT_DATA__.props.pageProps.{propKey} defaults to `null`, we need to check for the presence of the prop before indexing into it.\n// prop.null will error out\nfunction getNextDataPageProp(path, defaultValue) {\n var paths = path.split('.'),\n propKey = paths[0],\n propValue = paths[1],\n propObj = bouncex.utils.getNestedProp('__NEXT_DATA__.props.pageProps' + '.' + propKey) || {};\n\n return propObj[propValue] || defaultValue;\n}\n\nfunction getPDPVariants() {\n return getNextDataPageProp('product.variants', []);\n}\n\n/** *********** ITEM **************/\nfunction getItem() {\n var url = getUrl();\n return {\n id: getItemIdFromUrl(url),\n copy: getWunderkindProp('productName').replace(/~[A-Z][0-9]+$/g, '').split('~')[0],\n category: getWunderkindProp('categoryInfo.0.name') || 'global',\n url: url,\n imageurl: getWunderkindProp('imageUrl'),\n price: Number(getWunderkindProp('price').replace(/[^0-9.]/g, '')),\n instock: !!JSON.stringify(getPDPVariants()).match(/inventory_level\":[1-9]/g)\n };\n}\n\nfunction initializePdpEvents() {\n var item;\n bouncex.et.onTrue(function () {\n item = getItem();\n return !!item.id &&\n !!item.copy &&\n !!item.category &&\n !!item.url &&\n !!item.imageurl &&\n !!getPDPVariants().length;\n }, function () {\n if (item.url.indexOf('gift-card') > -1) {\n return;\n }\n bouncex.push(['item', item]);\n var groupId = getWunderkindProp('product_id');\n bouncex.push(['view item', { 'item:id': item.id, 'item:itemgroupid': groupId }]);\n initializeCatalogTracking(item.id, groupId);\n initATCEvents(item.id);\n }, 10);\n}\n\nfunction initATCEvents(itemId) {\n var variants,\n skuMap = {};\n bouncex.et.onTrue(function () {\n variants = getPDPVariants();\n variants.forEach(function (variant) {\n var sku = variant.sku,\n atcId = variant.id;\n if (sku && atcId) {\n skuMap[sku] = atcId;\n }\n });\n return !!Object.keys(skuMap).length;\n }, function () {\n initializeATCClickTracking(itemId, skuMap);\n }, 10);\n}\n\nfunction initializeATCClickTracking(itemId, skuMap) {\n bouncex.et.on(jQuery('#form-action-addToCart'), 'click.bxatc', function () {\n var lineItem = {\n quantity: (jQuery('#QTY input').val() || '1').replace(/[^0-9]/g, ''),\n productId: getWunderkindProp('addToCartFormData.product_id'),\n variantId: skuMap[bouncex.utils.url.getParam('sku')]\n };\n\n if (!lineItem.quantity || !lineItem.productId || !lineItem.variantId) {\n return;\n }\n\n bouncex.push(['add to cart', {\n 'item:id': itemId,\n 'cart:item': JSON.stringify(lineItem)\n }]);\n\n bouncex.setv('cart', true);\n });\n}\n\n/** *********** CATALOG EVENTS **************/\nfunction initializeCatalogTracking(itemId, groupId) {\n var sku = getProductSku();\n if (!jQuery('.bg-secondary-btn').length && sku) {\n fireSelectSku(itemId, groupId, sku);\n return;\n }\n\n bouncex.et.on(jQuery('[data-testid*=PDP_option]'), 'click.bxsku', function () {\n bouncex.setTimeout2(function () {\n var newSku = getProductSku();\n if (newSku && newSku !== sku) {\n fireSelectSku(itemId, groupId, sku);\n sku = newSku;\n }\n }, 1000);\n });\n}\n\nfunction fireSelectSku(itemId, groupId, sku) {\n bouncex.push([\n 'select_sku',\n {\n 'item:id': itemId,\n 'item:itemgroupid': groupId,\n 'item:feedid': sku\n }\n ]);\n}\n\nfunction getProductSku() {\n return getWunderkindProp('sku_id');\n}\n\n/** *********** CATEGORY **************/\nfunction getItemIdsCat() {\n var ids = [],\n $tiles = jQuery('[data-testid=Product_tile]'),\n i = 0,\n id = '';\n\n for (i; i < $tiles.length; i++) {\n id = getItemIdFromUrl(jQuery($tiles).eq(i).find('a').first().attr('href'));\n\n if (!id || ids.indexOf(id) > -1) {\n continue;\n }\n\n ids[ids.length] = id;\n }\n\n return ids.join(',');\n}\n\nfunction getCategoryObject() {\n return {\n 'page:url': getUrl(['query']),\n 'items:ids': getItemIdsCat()\n };\n}\n\nfunction initializeCategoryEvents() {\n var categoryObj;\n\n bouncex.et.onTrue(\n function () {\n categoryObj = getCategoryObject();\n return !!categoryObj['items:ids'].length &&\n !!categoryObj['page:url'];\n },\n function () {\n bouncex.push(['view category', categoryObj]);\n },\n 10\n );\n\n return;\n}\n\n/** *********** CART **************/\nfunction initializeCartEvents() {\n bouncex.et.cart.init({\n replenishmentType: 'ajax',\n replenish: replenish,\n });\n\n bouncex.setTimeout2(function () {\n if (bouncex.vars.cart && !bouncex.vars.cart_qty) {\n emptyCart();\n }\n\n bouncex.et.onVarChange('cart_qty', function (oldVal, newVal) {\n if (bouncex.vars.cart && !newVal) {\n emptyCart();\n }\n });\n }, 1000);\n}\n\nfunction emptyCart() {\n bouncex.push(['empty_cart', {}]);\n bouncex.setv('cart', false);\n}\n\n// First AJAX call has a different endpoint than each subsequent AJAX call.\n// We also need access to the cart ID, which is returned in the first AJAX call's response.\nfunction replenish(cart) {\n var token;\n bouncex.et.onTrue(function () {\n token = bouncex.getBounceCookie('XSRF-TOKEN');\n return token;\n }, function () {\n // if the cart is created, from a previous session, we will add to it\n var cartId = getNextDataPageProp('cart.id', '');\n if (cartId) {\n createAJAXExistingCart(cart.items, token, cartId);\n } else {\n createAJAXNewCart(cart.items, token);\n }\n }, 10);\n}\n\nfunction createAJAXNewCart(items, token) {\n var firstItem = items[0],\n restOfTheItems = items.slice(1);\n jQuery.ajax({\n method: 'POST',\n url: '/api/storefront/carts?include=lineItems.physicalItems.options',\n data: JSON.stringify({ lineItems: [firstItem], locale: 'en' }),\n xhrFields: {\n withCredentials: true\n },\n headers: {\n 'Content-Type': 'application/json',\n 'x-xsrf-token': token\n },\n success: (respXhr) => {\n var cartId = bouncex.utils.getNestedProp('responseJSON.id', '', respXhr) || bouncex.utils.getNestedProp('id', '', respXhr);\n if (cartId) {\n createAJAXExistingCart(restOfTheItems, token, cartId);\n }\n }\n });\n}\n\nfunction makeCreatedCartReplenItem(item, token, cartId) {\n return function () {\n jQuery.ajax({\n method: 'POST',\n url: `/api/storefront/carts/${cartId}/items?include=lineItems.physicalItems.options`,\n data: JSON.stringify({ lineItems: [item], locale: 'en' }),\n xhrFields: {\n withCredentials: true\n },\n headers: {\n 'Content-Type': 'application/json',\n 'x-xsrf-token': token\n }\n });\n };\n}\n\nfunction createAJAXExistingCart(items, token, cartId) {\n var $deferreds = [];\n items.forEach(function (item) {\n $deferreds.push(makeCreatedCartReplenItem(item, token, cartId));\n });\n\n $deferreds.reduce(function (promise, func) {\n return promise.then(function () {\n return func();\n });\n }, jQuery.Deferred().resolve([]))\n .then(replenComplete);\n}\n\nfunction replenComplete() {\n window.location.href = window.location.pathname + '?bx_replen=true';\n}\n\n/** *********** CART EVENTS **************/\nfunction initializeLoggedInUser() {\n if (bouncex.vars.logged_in_identified) {\n return;\n }\n var url = getUrl();\n if (url.indexOf('/account') > -1 || url.indexOf('/login') > -1) {\n addAccountPageLoggedInListener();\n return;\n }\n\n if (!bouncex.vars.logged_in) {\n return;\n }\n\n var userEmail;\n bouncex.et.onTrue(function () {\n // eslint-disable-next-line no-undef\n userEmail = _pp && _pp.email || getNextDataPageProp('user.email', '');\n return bouncex.utils.validate.email(userEmail);\n }, function () {\n fireLoggedInUser(userEmail);\n }, 5);\n}\n\nfunction addAccountPageLoggedInListener() {\n var userEmail;\n bouncex.et.onTrue(function () {\n userEmail = jQuery('[data-testid=account-email]').val();\n return bouncex.utils.validate.email(userEmail);\n }, function () {\n fireLoggedInUser(userEmail);\n }, 90);\n}\n\nfunction fireLoggedInUser(userEmail) {\n bouncex.push([\n 'user',\n {\n 'email': userEmail,\n 'source': 'LoggedIn'\n }\n ]);\n bouncex.setv('logged_in_identified', true);\n // eslint-disable-next-line no-undef\n setBounceCookie();\n}\n\n/** *********** CUSTOM ABANDONMENT **************/\nfunction trackClickThroughParams() {\n bouncex.et.onTrue(function () {\n return bouncex.utils.getParam('utm_source').toLowerCase() === 'reactivation' &&\n bouncex.utils.getParam('utm_medium').toLowerCase() === 'email' &&\n !bouncex.vars.click_suppression_once;\n }, function () {\n bouncex.push(['param_suppression', {}]);\n bouncex.setv('click_suppression_once', true);\n // eslint-disable-next-line no-undef\n setBounceCookie();\n }, 5);\n}\n\n\n/** *********** INITIALIZE EVENTS **************/\nfunction isEn() {\n return jQuery('html').attr('lang') === 'en';\n}\n\nfunction isValidDomain() {\n var url = getUrl();\n return url.indexOf('onekingslane.com') > -1 && url.indexOf('uat.onekingslane.com') < 0;\n}\n\nfunction init() {\n if (isValidDomain() && isEn()) {\n initializeCartEvents();\n initializeLoggedInUser();\n trackClickThroughParams();\n\n switch (bouncex.website.pts) {\n case 'product':\n initializePdpEvents();\n break;\n case 'category':\n case 'search':\n initializeCategoryEvents();\n break;\n default:\n break;\n }\n }\n return;\n}\n\ninit();\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":"/basket"},{"activation":"current_page_url","prop":"contains","prop2":"","prop3":"","val":"/cart"}]]},"category":{"testmode":false,"val":[[{"activation":"current_page_url","prop":"contains","prop2":"","prop3":"","val":"/c/"},{"activation":"js","prop":"","prop2":"","prop3":"","val":"!!document.querySelector('.category-title');"}],[{"activation":"current_page_url","prop":"not_contains","prop2":"","prop3":"","val":"/search"}]]},"checkout":{"testmode":false,"val":[[{"activation":"current_page_url","prop":"contains","prop2":"","prop3":"","val":"/checkout"}],[{"activation":"current_page_url","prop":"not_contains","prop2":"","prop3":"","val":"/thankyou"}],[{"activation":"current_page_url","prop":"not_contains","prop2":"","prop3":"","val":"/accountsetup"}]]},"home":{"testmode":false,"val":[[{"activation":"js","prop":"","prop2":"","prop3":"","val":"window.location.pathname === \"/\";"}]]},"product":{"testmode":false,"val":[[{"activation":"current_page_url","prop":"contains","prop2":"","prop3":"","val":"/p/"},{"activation":"js","prop":"","prop2":"","prop3":"","val":"!!document.querySelector('[data-testid=PDP_productName]');"}]]},"search":{"testmode":false,"val":[[{"activation":"current_page_url","prop":"contains","prop2":"","prop3":"","val":"/search"},{"activation":"js","prop":"","prop2":"","prop3":"","val":"!!document.querySelector('.category-title');"}]]},"test":{"testmode":true,"val":[[{"activation":"current_page_url","prop":"contains","prop2":"","prop3":"","val":""}]]}},"els":{"CART - Promo Code Apply Button":".ml-basket-button-wrapper","CART - Promo Code Box":"#sourceCode","CARTCheckoutButtonDesktop":".ml-basket-button-checkout","CARTCheckoutButtonMobile":".ml-basket-button-checkout-xs","CAT - Product Grid Image":".ml-grid-item-image","Footer":"footer","Navigation bar":"header","PDP - Add to Cart Button":".ml-product-btn-primary:has(.ml-button-add-basket)","PDP - Color Option":"[data-initmessage=\"Color\"] + [class*=\"optionType\"]","PDP - Product Name":".ml-product-name h1","PDP - Product Price":".ml-product-pricing","PDP - Quantity Option":".ml-product-qty","PDP - Size Option":"[data-initmessage=\"Size\"] + [class*=\"optionType\"]","PDPHeroImageDesktop":"#sViewer","PDPHeroImageMobile":".ml-product-detailimgcontainer .slick-list","PDPThumbnailImageDesktop":"#s7Swatches","SEARCH - Product Grid Image":".ml-grid-item-image"},"vars":[{"name":"cart_count","polling":"none","persist":"no","page_types":[],"testmode":false,"default":"false","code":"","trigger":""},{"name":"logged_in","polling":"all","persist":"visit","page_types":[],"testmode":false,"default":"false","code":"(function() {\n if (bouncex.website.pts === 'home' || bouncex.website.pts === 'checkout') {\n return null;\n }\n \n return !!bouncex.utils.getNestedProp('__NEXT_DATA__.props.pageProps.user') && !!bouncex.utils.getNestedProp('__NEXT_DATA__.props.pageProps.user.email') || !!jQuery('p:contains(Sign out)').length || jQuery('#topNav-account').text().toLowerCase().indexOf(\"my account\") > -1;\n})();","trigger":""},{"name":"ever_logged_in","polling":"none","persist":"permanent","page_types":[],"testmode":false,"default":"false","code":"bouncex.vars.logged_in || null;","trigger":""},{"name":"cart_qty","polling":"all","persist":"visit","page_types":[],"testmode":false,"default":"0","code":"(function() {\n if (bouncex.website.pts === 'checkout') {\n return null;\n }\n\tvar qty = 0;\n\n\tif (bouncex.website.pts === 'checkout') {\n\t\tjQuery('select[name=\"item-qty\"]').each(function() {\n\t\t\tqty += Number((jQuery(this).val() || 0).replace(/[^0-9.]/g, ''));\n\t\t});\n\n \treturn qty;\n\t}\n\n\treturn Number(jQuery('.ml-header-global-cart-count,.cart-quantity').first().text().replace(/[^0-9.]/g, ''));\n})();","trigger":""},{"name":"cart_value","polling":"all","persist":"visit","page_types":[],"testmode":false,"default":"0","code":"(function() { \n if (bouncex.website.pts === 'checkout') {\n return null;\n }\n \n var qty = jQuery('.ml-header-global-cart-count,.cart-quantity').first().text().replace(/[^0-9.]/g, '');\n \n if (qty && qty === '0') {\n return 0;\n }\n return Number(jQuery('#cartPreview').find(':contains($)').last().text().replace(/[^0-9.]/g, '')) || null;\n})();","trigger":""},{"name":"submitted_onsite","polling":"all","persist":"permanent","page_types":[],"testmode":false,"default":"false","code":"jQuery('#emailSignUp').parent().text().toLowerCase().indexOf(\"you're signed up\") > -1 || null;","trigger":""},{"name":"in_stock","polling":"all","persist":"no","page_types":["product"],"testmode":false,"default":"false","code":"jQuery('.ml-product-item-alert.ml-product-item-unavailable').length === 0;","trigger":""},{"name":"page_url","polling":"none","persist":"no","page_types":["category","product","search"],"testmode":false,"default":"false","code":" bouncex.utils.url.allowParams('query');","trigger":"pageload"},{"name":"cart","polling":"none","persist":"visit","page_types":[],"testmode":false,"default":"false","code":"null;","trigger":"pageload"},{"name":"logged_in_identified","polling":"none","persist":"visit","page_types":[],"testmode":false,"default":"false","code":"null;","trigger":"pageload"},{"name":"click_suppression_once","polling":"none","persist":"visit","page_types":[],"testmode":false,"default":"false","code":"null;","trigger":"pageload"},{"name":"category_name","polling":"none","persist":"no","page_types":[],"testmode":false,"default":"false","code":"(function(){\n if( jQuery('[class*=category-heading] h1').length > 0){\n return jQuery('[class*=category-heading] h1').text().trim()\n }\n return false;\n})()","trigger":"pageload"},{"name":"design_form_progress","polling":"none","persist":"visit","page_types":[],"testmode":false,"default":"false","code":"null;","trigger":"pageload"},{"name":"sale_items","polling":"none","persist":"no","page_types":["product"],"testmode":false,"default":"false","code":"!!jQuery('[data-testid=PDP_productDiscount]').text();","trigger":"pageload"},{"name":"cart_plurality","polling":"all","persist":"no","page_types":[],"testmode":false,"default":"false","code":"bouncex.vars.cart_qty > 1 ? 'items' : 'item';","trigger":"pageload"},{"name":"cart_plurality_are","polling":"all","persist":"no","page_types":[],"testmode":false,"default":"false","code":"bouncex.vars.cart_qty > 1 ? 'are' : 'is';","trigger":"pageload"},{"name":"submitted_design_lead","polling":"none","persist":"permanent","page_types":[],"testmode":false,"default":"false","code":"null;","trigger":"pageload"},{"name":"utm_source","polling":"none","persist":"no","page_types":[],"testmode":false,"default":"false","code":"bouncex.utils.url.getParam('utm_source');","trigger":"pageload"},{"name":"utm_medium","polling":"none","persist":"no","page_types":[],"testmode":false,"default":"false","code":"bouncex.utils.url.getParam('utm_medium');","trigger":"pageload"},{"name":"utm_campaign","polling":"none","persist":"no","page_types":[],"testmode":false,"default":"false","code":"bouncex.utils.url.getParam('utm_campaign');","trigger":"pageload"},{"name":"utm_term","polling":"none","persist":"no","page_types":[],"testmode":false,"default":"false","code":"bouncex.utils.url.getParam('utm_term');","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":{"bxid":"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":"\n let segments = {\n\n /* PROPERTIES */\n testMode: false,\n interceptEnabled: true,\n mirrorEnabled: true,\n arrayObserverEnabled: true,\n\n /* METHODS */\n /* Intercept Events */\n useIntercept() {\n if (!this.interceptEnabled) {\n return;\n }\n bouncex.utils.shqInterceptEvent = {\n\n // true blocks event, defined functions run in place of default\n productView: function(){\n var prodId = bouncex.utils.getNestedProp('wunderkind.sku_id', '');\n if (prodId) {\n _shq.push(['onProductView', {\n productId: prodId\n }]);\n }\n },\n cartAdd: true,\n cartEmpty: false,\n categoryView: function(){\n if(bouncex.website.pts === 'search'){\n var searchPhrase = bouncex.utils.getParam('query').replace(/\\+/gi,' ');\n _shq.push(['onSearch', {\n searchPhrase: searchPhrase\n }]);\n }else if(bouncex.website.pts === 'category'){\n var catName = document.querySelector('.category-title') ? document.querySelector('.category-title').textContent : '';\n if(!!catName){\n _shq.push([ 'onCategory', {\n catId: catName,\n catName: catName,\n }]);\n }\n }\n },\n purchase: function(wkndEventParams){\n var oid = bouncex.utils.getNestedProp('obj.order_id', null, wkndEventParams),\n items = JSON.parse(localStorage.getItem('$cartItems')),\n total = localStorage.getItem('$cartTotal');\n if(oid && items && items.length > 0 && total > 0){\n _shq.push([ \"onPurchase\", {\n orderItems : items,\n orderId: oid,\n total: total\n }]);\n }else{\n _shq.push(['onPurchase',{\n usebasket: true,\n orderId: oid\n }]);\n }\n },\n\n coupon: false,\n search: false,\n checkout: false,\n email: false,\n phone: false,\n };\n },\n\n /* Mirror Events */\n useMirror() {\n if (!this.mirrorEnabled) {\n return;\n }\n bouncex.utils.shqMirrorEvent = {\n\n // defined functions run after designated shq_wknd_event to process event or source names\n reloadcampaigns: function () {\n var getCartItems = document.querySelectorAll('div#cartPreview > .grid > div.col-span-6');\n if(getCartItems.length > 0){\n var items = [],\n total = 0;\n getCartItems.forEach(function(item){\n var prodPrice = item?.querySelector('p[data-testid*=\"cart-item\"]')?.textContent.replace(/[^0-9.]/g, ''),\n prodQty = item?.querySelector('input[name=\"qty\"]')?.value,\n prodId = item?.getAttribute('data-product-id');\n if(prodPrice && prodQty && prodId){\n items.push({\n productId: prodId,\n price: prodPrice,\n qty: prodQty\n }),\n total += +prodPrice * +prodQty; \n }\n })\n if(items && items.length > 0 && total > 0){\n localStorage.setItem('$cartItems', JSON.stringify(items));\n localStorage.setItem('$cartTotal', total);\n }\n }\n},\n pageview: false,\n 'add to cart': false,\n 'view item': false,\n select_sku: false,\n item: false,\n eligible: false,\n pop: false,\n visit: false,\n };\n },\n processObserver(e) {\n\n // Write handle methods here:\n while (e.length) {\n let event = e.shift();\n var sEvent = bouncex.utils.getNestedProp('event', '', event);\n if(!!sEvent && sEvent === 'addToCart'){\n this.processCartAdd(event);\n }\n }\n },\n\n processCartAdd(e){\n var atcItem = bouncex.utils.getNestedProp('ecommerce.add.products', [], e).map(function(item){\n var prodId = bouncex.utils.getNestedProp('wunderkind.sku_id', ''),\n prodPrice = bouncex.utils.getNestedProp('price', '', item),\n prodQty = bouncex.utils.getNestedProp('quantity', '', item);\n if(prodId && prodQty && prodPrice){\n return {\n ProductId: prodId,\n UnitPrice: prodPrice,\n Quantity: prodQty\n };\n }\n });\n if(atcItem.length > 0){\n _shq.push(['onCartAdd', {\n CartId: null,\n Items: atcItem,\n Total: Number(atcItem[0].Quantity * Number(atcItem[0].UnitPrice))\n }]);\n }\n\n },\n\n arrayObserver() {\n if (!this.arrayObserverEnabled) {\n return;\n }\n bouncex.et.onTrue(\n () => {\n return bouncex.utils.getNestedProp('window._shq.loaded');\n },\n () => {\n _shq.ArrayObserver(window.dataLayer, (e) => {\n this.processObserver(e);\n });\n }\n );\n },\n\n /* Initialize Segments Tracking */\n init() {\n\n // test mode\n if (this.testMode && !bouncex.testmode.bxdev) return;\n\n // attach object to window & bouncex.utils\n if (!bouncex.utils) {\n return;\n }\n bouncex.utils.segments = this;\n\n // initialize intercept and mirror, comment out if not needed\n this.useIntercept();\n this.useMirror();\n this.arrayObserver();\n },\n};\n\nsegments.init();\n","crs":{"integrations":null,"pageCount":null},"mat":0,"math":0,"cpnu":"coupons.bounceexchange.com","dfpcms":0,"sms":{"optm":"Hit 'Send' to sign-up for automated, recurring One Kings Lane mktg txts (like cart reminders) to this #, per terms.","eventSharing":true,"shqId":"hntf3boou6-1","enabled":1},"pde":true,"fmc":["US","CA"],"fme":true,"fmx":"","sdk":{"android":{"enabled":false,"enabledVersions":[],"eventModifications":null},"ios":{"enabled":false,"enabledVersions":[],"eventModifications":null}},"onsite":{"enabled":1},"ads":{"enabled":0},"pubs":{"enabled":0},"websdk":{"enabled":0},"ga4_property_id":"249672811","ga4_measurement_id":"G-NNJ6FW53NN"} ; 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":"274f3a24cf2fcadc20f55008ce8b650d","creativesBaseStyles":"a53944a2","gpsAuction":"1375a7b38c31e98d14fe7f396b72da14","inbox":"02aca5df0e176b8810a86da97ac05424","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_e15248ef4ac8cdb300e79b7fe94d0d13.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); } window._shq = window._shq || []; var eventSharingCartridge = document.createElement('script'); eventSharingCartridge.setAttribute('src', '//assets.bounceexchange.com/assets/smart-tag/versioned/wknd_audiences_2648fa8509e4b3a98a2790bb8171ddc1.js'); eventSharingCartridge.setAttribute('async', 'async'); document.body.appendChild(eventSharingCartridge); } if (document.readyState === "loading") { document.addEventListener("DOMContentLoaded", bxBootstrap); } else { bxBootstrap(); }})();