(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":4824,"name":"The Children's Place","cookie_name":"bounceClientVisit4824","domain":"childrensplace.com","ct":"fp_local_storage","ally":0,"ei":0,"tcjs":"","cjs":"/* enable.feature.DISABLE_RELOAD_CAMPAIGNS_V2 */\n\n\n/* wrike 783331164: reload campaigns if user identified, but no campaigns showing */\nif (!bouncex.vars.user_identified_ibx) {\n bouncex.et.onVarChange('user_identified_ibx', function(old, new_val) {\n var campaign_visible = false;\n for (var c_id in bouncex.campaigns) {\n if (bouncex.campaigns.hasOwnProperty(c_id) && bouncex.campaigns[c_id].ad_visible) {\n campaign_visible = true;\n break;\n }\n }\n \n /* RTV value was previously false, currently true, and no campaigns impressed */\n if (!old && new_val && !campaign_visible) {\n bouncex.reload_campaigns();\n }\n });\n}\n\n(function(){\n var clickThruCoupon = bouncex.utils.url.getParam('coupon');\n if (clickThruCoupon) {\n bouncex.setVar('click_thru_cpn', clickThruCoupon);\n } \n})();","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":"/* ---------------------------- SHARED VARIABLES ---------------------------- */\nvar globalConfig = {\n\t\t'4824': {\n\t\t\tdomain_origin: 'www.childrensplace.com/us'\n\t\t},\n\t\t'4825': {\n\t\t\tdomain_origin: 'www.gymboree.com/us'\n\t\t}\n\t},\n\tconfig = globalConfig[bouncex.website.id],\n\tPDP_ID;\n\n/* --------------------------------- HELPERS -------------------------------- */\nfunction getUrl() {\n\tvar url = bouncex.utils.url.allowParams();\n\n\tif (url.indexOf('&') > -1) {\n\t\turl = url.split('&')[0];\n\t}\n\n\treturn url;\n}\n\nfunction setVarAndCookie(varName, value) {\n\tbouncex.setVar(varName, value);\n\tbouncex.setBounceCookie();\n}\n\nfunction isCollectionPage() {\n\treturn getUrl().indexOf('Collection') > -1;\n}\n\nfunction formatItemId(string) {\n\tvar itemId = string.split('/').pop() || '';\n\treturn itemId.split('-').slice(-2).join('_');\n}\n\nfunction getCurrentProduct() {\n if (window.__NEXT_REDUX_STORE__ && typeof window.__NEXT_REDUX_STORE__.getState === 'function') {\n var state = window.__NEXT_REDUX_STORE__.getState();\n return bouncex.utils.getNestedProp('ProductDetail.currentProduct', {}, state);\n }\n return {};\n}\n\nfunction getSkuObj() {\n\tvar selectedColor = jQuery('.image-chips-selector-title-name').text(),\n\t\tselectedFit = jQuery('.fit-selector .item-selected-option').text(),\n\t\tselectedSize = jQuery('.size-selector .item-selected-option').text() || jQuery('.size-and-fit-detail-item input:checked').val() || jQuery('.size-and-fit-detail-item.item-selected-option input').val(),\n\t\tcurrentProduct = getCurrentProduct(),\n\t\tcolorArr = bouncex.utils.getNestedProp('colorFitsSizesMap', [], currentProduct),\n\t\tcolorObj,\n\t\tfitArr,\n\t\tfitObj,\n\t\tsizeArr,\n\t\tselectedSku,\n\t\tselectedGroupId;\n\n\t// If correct object has not loaded we can not fire select_sku events\n\tif (currentProduct && currentProduct.productId !== PDP_ID) {\n\t\treturn;\n\t}\n\n\t// Find the selected color from the window obj color array.\n\t// If no color is selected (i.e. there is only one color) then\n\t// our colorObj will be the first element from the color array.\n\tif (selectedColor) {\n\t\tcolorArr.forEach(function(c){\n\t\t\tif (c.color.name === selectedColor){\n\t\t\t\tcolorObj = c;\n\t\t\t}\n\t\t});\n\t} else {\n\t\tcolorObj = colorArr[0] || {};\n\t}\n\n\tfitArr = colorObj && colorObj.fits || [];\n\n\t// find the selected fit from the colorObj fits array.\n\t// If no fit is selected (i.e. there is only one fit) then\n\t// our fitObj will be the first element from the fits array.\n\tif (selectedFit) {\n\t\tfitArr.forEach(function(f){\n\t\t\tif (f.fitName === selectedFit){\n\t\t\t\tfitObj = f;\n\t\t\t}\n\t\t});\n\t} else {\n\t\tfitObj = fitArr[0] || {};\n\t}\n\n\tsizeArr = fitObj && fitObj.sizes || [];\n\n\t// find the selected size from the size array\n\t// and grab the skuID and groupID from here\n\tsizeArr.forEach(function(variant){\n\t\tif (variant.sizeName === selectedSize) {\n\t\t\tselectedSku = variant.variantId;\n\t\t\tselectedGroupId = variant.prodPartNo;\n\t\t}\n\t});\n\n\treturn {\n\t\tselectedSku: selectedSku,\n\t\tselectedGroupId: selectedGroupId\n\t};\n}\n\n/* ------------------------------ ITEM TRACKING ----------------------------- */\nfunction getProdName() {\n var textNodesFiltered = jQuery('h2[itemprop=\"name\"],.product-title').eq(0)\n .contents()\n .filter(function () {\n return this.nodeType === 3;\n });\n return textNodesFiltered.eq(0).text();\n}\n\nfunction getItemImage(itemId) {\n\tvar $metaImages = jQuery('meta[property=\"og:image\"]'),\n\t\timgUrl = jQuery('meta[property=\"og:image\"]').first().attr('content') || '',\n\t\tsmImg = '/w_200/',\n\t\tlgImg = '/w_600/';\n\n\t$metaImages.each(function(){\n\t\tif((jQuery(this).attr('content') || '').indexOf(itemId + '.') > -1) {\n\t\t\timgUrl = jQuery(this).attr('content');\n\t\t}\n\t});\n\n\tif (imgUrl.indexOf('.mp4') > -1) {\n\t\timgUrl = jQuery('meta[property=\"og:image\"]').eq(1).attr('content') || '';\n\t}\n\n\tif (imgUrl.indexOf(smImg) > -1) {\n\t\timgUrl = imgUrl.replace(smImg, lgImg);\n\t}\n\n\treturn imgUrl;\n}\n\nfunction getItem() {\n\tvar url = getUrl(),\n\t\titemId = formatItemId(url);\n\treturn {\n\t\tid: itemId,\n\t\tcopy: getProdName(),\n\t\tcategory: jQuery('.breadcrum-container span:last').text() || 'Global',\n\t\turl: url,\n\t\timageurl: getItemImage(itemId),\n\t\tprice: bouncex.vars.prod_price,\n\t\tinstock: !jQuery('.add-to-bag-button').attr('disabled'),\n\t\tabanexclude: jQuery('#productDetailsSection .product-badge').first().text().toLowerCase().indexOf('just a few left') > -1\n\t};\n}\n\nfunction fireViewItem(item) {\n\tvar pushItem = {\n\t\t'item:id': item.id\n\t};\n\n\tif (item.groupId) {\n\t\tpushItem['item:itemgroupid'] = item.groupId;\n\t}\n\tbouncex.push(['view item', pushItem]);\n}\n\nfunction isExcluded(item) {\n\treturn (\n\t\titem.url.indexOf('giftcard') > -1 ||\n\t\tbouncex.utils.getNestedProp('pageData.pageType') === 'outfit' ||\n\t\twindow.location.href.indexOf('search') === 0\n\t);\n}\n\nfunction initializeItemEvents() {\n\tvar item;\n\n\tbouncex.et.onTrue(\n\t\tfunction () {\n\t\t\titem = getItem();\n\t\t\treturn (\n\t\t\t\t!!item.id &&\n\t\t\t\t!!item.copy &&\n\t\t\t\t!!item.category &&\n\t\t\t\t!!item.price &&\n\t\t\t\t!!item.url &&\n\t\t\t\t!!item.imageurl\n\t\t\t);\n\t\t},\n\t\tfunction () {\n\t\t\tif (isExcluded(item)) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif (isCollectionPage()) {\n\t\t\t\tfireCollectionPdpTracking(item);\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tbouncex.setTimeout2(function () {\n\t\t\t\tbouncex.push(['item', item]);\n\t\t\t\titem.groupId = item.id;\n\t\t\t\tPDP_ID = item.id;\n\t\t\t\tinitializeSkuEvents();\n\t\t\t\tfireViewItem(item);\n\t\t\t\trequestAndTrackStyliticsData(item.id);\n\t\t\t\tinitializePDPWishListTracking(item.id);\n\t\t\t}, 1500);\n\t\t},\n\t\t10\n\t);\n}\n\n// Collection pages do not have groupid's\nfunction fireCollectionPdpTracking(item) {\n\titem.imageurl = jQuery('.outfit-carousal-image.full-size-desktop-image').attr('src');\n\titem.price = jQuery('meta[itemprop=\"price\"]:first').attr('content');\n\tbouncex.push(['item', item]);\n\tfireViewItem(item);\n}\n\nfunction requestAndTrackStyliticsData(itemId) {\n const styliticsURL = 'https://widget-api.stylitics.com/api/outfits?username=thechildrensplace&total=10&item_number=' + itemId; \n \n jQuery.ajax(styliticsURL, {\n success : (res) => {\n bouncex.styliticsData = res;\n \n if (!bouncex.styliticsData || !bouncex.styliticsData.length) {\n bouncex.log('error no stylitics data');\n return;\n }\n\n trackStylitics(itemId);\n },\n error : () => {\n bouncex.error('stylitics data not retrieved');\n }\n });\n}\n\nfunction getBundleURL($bundle) { // stylitics-bundle-container element\n var bundleId = $bundle.attr('data-bundle-id');\n\n if (!bundleId) { return false; }\n\n var outfitData = bouncex.styliticsData.find(outfit => outfit.id === +bundleId);\n\n if (!outfitData || !outfitData.items) { return false; }\n \n var itemIds = outfitData.items.map(item => item.remote_id) || [];\n\n if (!itemIds.length) { return false;}\n\n return `https://www.childrensplace.com/us/outfit/${bundleId}/${itemIds.join('-')}`;\n}\n\nfunction trackStylitics(itemId) {\n jQuery('.stylitics-bundle-container').slice(0,3).each(function () {\n var $el = jQuery(this),\n imageUrl = $el.find('img[src*=\"content.stylitics\"]').attr('src'),\n itemUrl = getBundleURL($el);\n\n var withHost = itemUrl && itemUrl.indexOf(window.location.host) > -1 ? itemUrl : window.location.origin + itemUrl;\n\n if (imageUrl && itemUrl) {\n bouncex.push([\n 'view_collection',\n {\n image_url: bouncex.utils.url.allowParams([], imageUrl),\n item_url: withHost,\n item_id: itemId\n },\n ]);\n }\n });\n}\n\n/* ------------------------------ SKU TRACKING ------------------------------ */\n\nfunction initializeSkuEvents() {\n\tvar lastSkuFired,\n\t\tskuObj;\n\n\tbouncex.et.on(\n\t\tbouncex.document,\n\t\t'click.bxsku',\n\t\tfunction () {\n\t\t\tbouncex.et.onTrue(function () {\n\t\t\t\tskuObj = getSkuObj();\n\t\t\t\treturn skuObj && skuObj.selectedSku && skuObj.selectedSku !== lastSkuFired;\n\t\t\t}, function () {\n\t\t\t\tbouncex.push([\n\t\t\t\t\t'select_sku',\n\t\t\t\t\t{\n\t\t\t\t\t\t'item:id': skuObj.selectedGroupId,\n\t\t\t\t\t\t'item:itemgroupid': skuObj.selectedGroupId,\n\t\t\t\t\t\t'item:feedid': skuObj.selectedSku\n\t\t\t\t\t}\n\t\t\t\t]);\n\t\t\t\tlastSkuFired = skuObj.selectedSku;\n\t\t\t}, 5);\n\t\t},\n\t\t'.size-and-fit-detail-item, .color-title-container'\n\t);\n}\n\n/* ---------------------------- CATEGORY TRACKING --------------------------- */\n\nfunction getItemIdsCat() {\n\tvar ids = [],\n\t\t$tiles = jQuery('.product-image a'),\n\t\ti = 0,\n\t\tid = '';\n\n\tfor (i; i < $tiles.length; i++) {\n\t\tid = formatItemId($tiles.eq(i).attr('href') || '');\n\n\t\tif (!id || ids.indexOf(id) > -1) {\n\t\t\tcontinue;\n\t\t}\n\n\t\tids[ids.length] = id;\n\t}\n\n\treturn ids.join(',');\n\t}\n\n\tfunction getCategoryObject() {\n\treturn {\n\t\t'page:url': getUrl(),\n\t\t'items:ids': getItemIdsCat()\n\t};\n}\n\nfunction initializeCategoryEvents() {\n\tvar categoryObj;\n\n\tbouncex.et.onTrue(\n\t\tfunction () {\n\t\t\tcategoryObj = getCategoryObject();\n\t\t\treturn (\n\t\t\t\t!!categoryObj['items:ids'].length && !!categoryObj['page:url']\n\t\t\t);\n\t\t},\n\t\tfunction () {\n\t\t\tbouncex.push(['view category', categoryObj]);\n\t\t},\n\t\t10\n\t);\n}\n\n/* ------------------------------- CART EVENTS ------------------------------ */\nfunction fireAddToCart(itemId) {\n\tbouncex.push(['add to cart', { 'item:id': itemId }]);\n\n\tif (bouncex.vars.cart) {\n\t\treturn;\n\t}\n\n\tsetVarAndCookie('cart', true);\n}\n\nfunction trackGlobalAtc() {\n\tbouncex.et.onVisible('.addedToBagWrapper.new-added-to-bag-modal',\n\t\tfunction (elem) {\n\t\t\tvar imageSelector = jQuery(elem).find('.product img.product-image'),\n\t\t\t\tgifSelector = jQuery(elem).find('img[alt=\"Product\"]'),\n\t\t\t\tproductSelector;\n\n\t\t\tproductSelector = imageSelector.length === 0 ? gifSelector : imageSelector;\n\n\t\t\tvar itemId = productSelector.attr('src').split('/').pop().split('.').shift();\n\n\t\t\tif (itemId) {\n\t\t\t\tfireAddToCart(itemId);\n\t\t\t}\n\t\t}\n\t);\n}\n\nfunction emptyCart() {\n\tbouncex.et.onVarChange('cart_qty', function (oldVal, newVal) {\n\t\tif (bouncex.vars.cart && newVal === 0 && oldVal > 0) {\n\t\t\tbouncex.push(['empty_cart']);\n\t\t\tsetVarAndCookie('cart', false);\n\t\t}\n\n\n\t});\n}\n\nfunction isValidEmptyCart() {\n\treturn (\n\t\tbouncex.vars.cart_qty === 0 &&\n\t\t!bouncex.utils.url.getParam('bx_cart') &&\n\t\t!bouncex.utils.getParam('bx_replen')\n\t);\n}\n\nfunction initializeCartEvents() {\n\tbouncex.et.cart.init({\n\t\treplenish: function () {\n\n\t\t},\n\t\treplenishmentType: 'single'\n\t});\n\n\temptyCart();\n\n\t// to handle universal cart edge cases\n\tif (bouncex.vars.cart) {\n\t\tbouncex.setTimeout2(function () {\n\t\t\tif (isValidEmptyCart()) {\n\t\t\t\tbouncex.push(['empty_cart']);\n\t\t\t\tsetVarAndCookie('cart', false);\n\t\t\t}\n\t\t}, 2500);\n\t}\n\n}\n\n/* ------------------------------ QUICKVIEW ----------------------------- */\nfunction initializeQuickviewEvents() {\n\tvar item = {};\n\tbouncex.et.onVisible(\n\t\t'.TCPModal__InnerContent.atb-innerContent',\n\t\tfunction (elem) {\n\t\t\tvar itemId = elem.find('.add-to-bag-button.quick-view-drawer-redesign').attr('unbxdparam_variant');\n\t\t\tif (itemId) {\n\t\t\t\titem.id = itemId;\n\t\t\t\titem.groupId = itemId;\n\t\t\t\tfireViewItem(item);\n\t\t\t}\n\t\t}\n\t);\n}\n\n/* ------------------------------ USER TRACKING ----------------------------- */\nfunction trackUserEmail() {\n\tvar userEmail;\n\tif (getUrl().indexOf('login') > -1) {\n\t\tjQuery('.login-button-test-class').click(function () {\n\t\t\tif (jQuery('.sc-kDTinF.ggyMuv.richTextColor').length === 0) {\n\t\t\t\tuserEmail = jQuery('#emailAddress').val();\n\t\t\t\tlocalStorage.setItem('userEmail', userEmail);\n\t\t\t}\n\t\t});\n\t}\n}\n\nfunction initializeUserTracking() {\n\tvar userEmail;\n\tif (bouncex.vars.logged_in && !bouncex.vars.logged_in_identified) {\n\t\tuserEmail =\n\t\t\tlocalStorage.getItem('userEmail') ||\n\t\t\tjQuery('span.sc-dkPtRN.epAOJm[data-locator=\"emailValue\"]').text();\n\n\t\tif (!bouncex.utils.validate.email(userEmail)) {\n\t\t\treturn;\n\t\t}\n\n\t\tbouncex.push([\n\t\t\t'user',\n\t\t\t{\n\t\t\t\temail: userEmail,\n\t\t\t\tsource: 'LoggedIn'\n\t\t\t}\n\t\t]);\n\t\tsetVarAndCookie('logged_in_identified', true);\n\t\treturn;\n\t}\n\n\ttrackUserEmail();\n}\n\n/* --------------------------- Triggering BW from Native Footer Submit and from \"/content/email-subscribe\" page-------------------------- */\nfunction initializeNativeEmailSubmit() {\n\tbouncex.off(jQuery(document), 'click.bx', 'button.candidate_a_form_button');\n\tbouncex.on(jQuery(document), 'click.bx', function () {\n\t\t\tvar userEmail = jQuery('input#signup').attr('value');\n\t\t\tbouncex.setTimeout2(function () {\n\t\t\t\tif (\n\t\t\t\t\tbouncex.utils.validate.email(userEmail) &&\n\t\t\t\t\tjQuery('.warning-icon').length === 0\n\t\t\t\t) {\n\t\t\t\t\tfireRequestEmail(userEmail);\n\t\t\t\t}\n\t\t\t}, 1000);\n\t\t},\n\t\t'button.candidate_a_form_button'\n\t);\n\n\tif (getUrl().indexOf('email-subscribe')) {\n\t\tbouncex.et.on(\n\t\t\tbouncex.document,\n\t\t\t'click.bx',\n\t\t\tfunction () {\n\t\t\t\tvar emailForm = jQuery(this).closest('.emailform__content'),\n\t\t\t\t\tuserEmail = emailForm.find('input#modal_signup').val();\n\n\t\t\t\tif (bouncex.utils.validate.email(userEmail)) {\n\t\t\t\t\tfireRequestEmail(userEmail);\n\t\t\t\t}\n\t\t\t},\n\t\t\t'.join-button'\n\t\t);\n\t}\n}\n\nfunction fireRequestEmail(userEmail) {\n\tbouncex.push([\n\t\t'requestemail',\n\t\t{\n\t\t\temail: userEmail,\n\t\t\tcampaignId: '1513814',\n\t\t\ttestmode: bouncex.testmode.bxdev ? 1 : 0\n\t\t}\n\t]);\n}\n\n/* --------------------------- Custom Cancel Event -------------------------- */\n\nfunction initializeCustomCancelEvent() {\n\tif (bouncex.utils.url.getParam('instore_coupon', window.location.href)) {\n\t\tbouncex.push(['conversion', {}]);\n\t\tbouncex.push(['used_coupon', {}]);\n\t\tbouncex.push(['visit', { 'customer:hasconverted': 1 }]);\n\t}\n}\n\n/* --------------------------- Custom Save For Later Cart Event -------------------------- */\n\nfunction trackSaveForLater() {\n var saveForLaterSelectors = 'button[data-locator=\"Save For Later\"], li:has(.save-for-later-icon)',\n itemId,\n itemUrl;\n\n bouncex.et.onVisible(saveForLaterSelectors, function (el) {\n if (bouncex.state.mobile) {\n var upc = jQuery(el).closest('ul').find('div[data-locator=\"cartItemUpc\"]').text().trim().replace('UPC: ','');\n itemUrl = jQuery('img[unbxdparam_sku=\"' + upc + '\"]').closest('.newCartTile').find('.imageWrapper a').attr('href') || '';\n itemId = formatItemId(itemUrl);\n }\n\n bouncex.off(bouncex.document, 'click.bx', saveForLaterSelectors);\n bouncex.et.on(bouncex.document, 'click.bx', function(e){\n if (!bouncex.state.mobile) {\n itemId = formatItemId((jQuery(e.target).parents('.product-tile-wrapper').find('.imageWrapper a').attr('href') || '').split('/').pop());\n }\n\n if(itemId) {\n bouncex.push(['saveforlater', {\n 'item:id' : itemId\n }]);\n }\n }, saveForLaterSelectors);\n });\n}\n\n/* --------------------------- Custom Wish List Event -------------------------- */\n\nfunction fireAddWishList(itemId) {\n bouncex.push(['wishlist', { 'item:id': itemId }]);\n}\n\nfunction initializePDPWishListTracking(itemId) {\n\tvar pdpWishListButton = jQuery('button[aria-label=\"Add To Favorite\"][aria-pressed=false]');\n\n\tbouncex.off(pdpWishListButton, 'click.bx');\n\tbouncex.et.on(pdpWishListButton, 'click.bx', function(e){\n\t\tvar $target = jQuery(e.target);\n\t\tif (!!bouncex.vars.logged_in && $target.find('path.empty-favorite-1, path.empty-favorite-2').length > 0) {\n\t\t\t\tfireAddWishList(itemId);\n\t\t\t}\n\t});\n}\n\nfunction initializeCategoryWishListTracking() {\n\tbouncex.off(bouncex.document, 'click.bxwl');\n\tbouncex.et.on(bouncex.document, 'click.bxwl', function (e) {\n\t\tvar $target = jQuery(e.target);\n\n\t\tif(!!bouncex.vars.logged_in &&\n\t\t\t($target.find('path.empty-favorite-1, path.empty-favorite-2').length > 0 || $target.hasClass('empty-favorite-1') || $target.hasClass('empty-favorite-2'))){\n\t\t\tvar id = formatItemId($target.parents('.flex-row.justify-between, .product-tile').parent().find('.product-image a, .product-image-container > a').attr('href'));\n\t\t\tfireAddWishList(id);\n\t\t}\n\t});\n}\n\n/* --------------------------- INITIALIZE TRACKING -------------------------- */\n\nfunction isValidDomain() {\n\treturn getUrl().indexOf(config.domain_origin) > -1;\n}\n\nfunction isEn() {\n\treturn jQuery('html').attr('lang') === 'en';\n}\n\nfunction isValidForTracking() {\n\treturn isValidDomain() && isEn();\n}\n\nfunction init() {\n\tif (!isValidForTracking()) {\n\t\treturn;\n\t}\n\n\tinitializeUserTracking();\n\tinitializeCartEvents();\n\tinitializeQuickviewEvents();\n\tinitializeNativeEmailSubmit();\n\tinitializeCustomCancelEvent();\n\ttrackGlobalAtc();\n\n\tswitch (bouncex.website.pts) {\n\t\tcase 'category':\n\t\t\tinitializeCategoryEvents();\n\t\t\tinitializeCategoryWishListTracking();\n\t\t\tbreak;\n\t\tcase 'product':\n\t\t\tinitializeItemEvents();\n\t\t\tbreak;\n\t\tcase 'search':\n\t\t\tinitializeCategoryEvents();\n\t\t\tinitializeCategoryWishListTracking();\n\t\t\tbreak;\n\t\tcase 'cart':\n\t\t\ttrackSaveForLater();\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tbreak;\n\t}\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":"/bag"}],[{"activation":"current_page_url","prop":"not_contains","prop2":"","prop3":"","val":"rwd-stage.childrensplace.com/us/bag"}]]},"category":{"testmode":false,"val":[[{"activation":"current_page_url","prop":"contains","prop2":"","prop3":"","val":"/us/c/"},{"activation":"current_page_url","prop":"contains","prop2":"","prop3":"","val":"/us/outfit"}]]},"checkout":{"testmode":false,"val":[[{"activation":"current_page_url","prop":"contains","prop2":"","prop3":"","val":"/checkout"}],[{"activation":"current_page_url","prop":"not_contains","prop2":"","prop3":"","val":"/confirmation"}]]},"home":{"testmode":false,"val":[[{"activation":"js","prop":"","prop2":"","prop3":"","val":"window.location.pathname === '/us/home'"}],[{"activation":"current_page_url","prop":"not_contains","prop2":"","prop3":"","val":"rwd-stage.childrensplace.com/us/home\t"}],[{"activation":"current_page_url","prop":"not_contains","prop2":"","prop3":"","val":"test-uat1.childrensplace.com/us/home\t"}],[{"activation":"current_page_url","prop":"not_contains","prop2":"","prop3":"","val":"local.childrensplace.com:3000/us/home"}],[{"activation":"current_page_url","prop":"not_contains","prop2":"","prop3":"","val":"es.childrensplace.com/us/home"}],[{"activation":"current_page_url","prop":"not_contains","prop2":"","prop3":"","val":"childrensplace.com/us/home/login"}],[{"activation":"current_page_url","prop":"not_contains","prop2":"","prop3":"","val":"test-uat"}]]},"product":{"testmode":false,"val":[[{"activation":"current_page_url","prop":"contains","prop2":"","prop3":"","val":"/p/"},{"activation":"current_page_url","prop":"contains","prop2":"","prop3":"","val":"/b/"},{"activation":"js","prop":"","prop2":"","prop3":"","val":"bouncex.utils.getNestedProp('pageData.pageType') === 'outfit';"}],[{"activation":"current_page_url","prop":"not_contains","prop2":"","prop3":"","val":"gift-card"}],[{"activation":"current_page_url","prop":"not_contains","prop2":"","prop3":"","val":"https://www.childrensplace.com/us/p/1015060"}],[{"activation":"current_page_url","prop":"not_contains","prop2":"","prop3":"","val":"https://www.childrensplace.com/us/p/1015059"}],[{"activation":"current_page_url","prop":"not_contains","prop2":"","prop3":"","val":"https://www.childrensplace.com/us/p/1015058"}]]},"search":{"testmode":false,"val":[[{"activation":"current_page_url","prop":"contains","prop2":"","prop3":"","val":"/search/"}]]}},"els":null,"vars":[{"name":"logged_in","polling":"all","persist":"visit","page_types":[],"testmode":false,"default":"false","code":"!!bouncex.getBounceCookie('tcpSessionInfo');","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":"no","page_types":[],"testmode":false,"default":"0","code":"Number(bouncex.utils.cookies.read('cartItemsCount'));","trigger":""},{"name":"cart_value","polling":"all","persist":"permanent","page_types":[],"testmode":false,"default":"0","code":"(function() {\n if (jQuery('.estd-total-label').length) {\n return Number(jQuery('.estd-total-label').text().replace(/[^0-9.]/g, ''));\n }\n else if (jQuery('.items-total p:not([data-locator=\"orderLedgerCount\"])').length) {\n return Number(jQuery('.items-total p:not([data-locator=\"orderLedgerCount\"])').text().replace(/[^0-9.]/g, ''));\n }\n else if (jQuery('.cartCount, .cart-count').length && Number(jQuery('.cartCount, .cart-count').eq(0).text()) === 0) {\n return 0;\n }\n else if(jQuery('.addedToBagWrapper').length){\n return Number(jQuery('.addedToBagWrapper div[data-locator=\"addedtobag-bagsubtotal\"] p').text().replace(/[^0-9.]/g, ''));\n }\n else {\n return null;\n }\n})();","trigger":""},{"name":"prod_price","polling":"all","persist":"no","page_types":["product"],"testmode":false,"default":"false","code":"jQuery('.actual-price:first').text().replace(/[^0-9.]/g, '');","trigger":""},{"name":"prod_name","polling":"all","persist":"no","page_types":["product"],"testmode":false,"default":"false","code":"jQuery('h2.product-title').contents().get(0) ? jQuery('h2.product-title').contents().get(0).nodeValue.trim() : '';","trigger":""},{"name":"in_stock","polling":"all","persist":"no","page_types":[],"testmode":false,"default":"false","code":"jQuery('.add-to-bag-button:first').text().toLowerCase().indexOf('add to bag') > -1;","trigger":""},{"name":"submitted_onsite","polling":"all","persist":"permanent","page_types":[],"testmode":false,"default":"false","code":"jQuery('.thank-you__label, #sign-up-modal-form-intro-view').length > 0 || null;","trigger":""},{"name":"page_url","polling":"none","persist":"no","page_types":["category","search"],"testmode":true,"default":"false","code":"","trigger":""},{"name":"cart","polling":"none","persist":"permanent","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":"has_20_off_coupon","polling":"all","persist":"permanent","page_types":[],"testmode":false,"default":"false","code":"bouncex.utils.isObject(bouncex.cookie.cpn) && (bouncex.cookie.cpn['20_off'] || bouncex.cookie.cpn['25_off'] || bouncex.cookie.cpn['25_off_2024'] || bouncex.cookie.cpn['30_off_2024']) || null;","trigger":"pageload"},{"name":"testhas_20_off_coupon","polling":"all","persist":"permanent","page_types":[],"testmode":true,"default":"false","code":"bouncex.utils.isObject(bouncex.cookie.cpn) && (bouncex.cookie.cpn['20_off'] || bouncex.cookie.cpn['25_off'] || bouncex.cookie.cpn['25_off_2024'] || bouncex.cookie.cpn['30_off_2024'] || bouncex.cookie.cpn['40_off_2024']) || null;","trigger":"pageload"},{"name":"user_identified_ibx","polling":"vars","persist":"permanent","page_types":[],"testmode":false,"default":"false","code":"bouncex.cookie.uid === 1 || bouncex.utils.url.getParam('utm_source') === \"wunderkind\" || !!bouncex.utils.url.getParam('om_rid') || !!bouncex.utils.url.getParam('ueh') || null;","trigger":"pageload"},{"name":"clicked_on_larger_size","polling":"all","persist":"visit","page_types":[],"testmode":false,"default":"false","code":"(function () {\n /* returns true if one of the larger sizes is currently seelcted */\n if (bouncex.website.pts === 'category' && jQuery('.filters-sorting-container .item-active p:contains(\"Size\"):visible, .size-detail-chips-items-list:visible').length < 1) {\n return null;\n }\n var largerSizes = ['L (10/12)', 'XL (14)', 'XXL (16)', '10', '12', '14', '16', '18', 'YOUTH 3', 'YOUTH 4', 'YOUTH 5', 'YOUTH 6', '12P', '14P', '16P', '18P', '10S', '12S', '14S', '16S'];\n var largeSizeSelected = false;\n \n jQuery('div.size-detail-chips-selected[data-locator] span, .size-field.item-selected-option .input-radio-title').each(function() {\n if (largerSizes.indexOf(jQuery(this).text()) > -1) {\n largeSizeSelected = true;\n return;\n }\n });\n return largeSizeSelected;\n})();","trigger":"pageload"},{"name":"category_demographic","polling":"all","persist":"no","page_types":[],"testmode":false,"default":"","code":"(function() {\n var titleText = jQuery('title').eq(0).text();\n if (titleText.indexOf('Toddler') > -1 && titleText.indexOf('Boy') > -1) {\n return 'Toddler Boy';\n } else if (titleText.indexOf('Toddler') > -1 && titleText.indexOf('Girl') > -1) {\n return 'Toddler Girl';\n } else if (titleText.indexOf('Boy') > -1) {\n return 'Boy';\n } else if (titleText.indexOf('Girl') > -1) {\n return 'Girl';\n } else if (titleText.indexOf('Men') > -1 && titleText.indexOf('Women') > -1) {\n return 'Adult';\n } else if (titleText.indexOf('Men') > -1) {\n return 'Men';\n } else if (titleText.indexOf('Women') > -1) {\n return 'Women';\n } else {\n return 'General';\n }\n})();","trigger":"pageload"},{"name":"page_type","polling":"none","persist":"no","page_types":[],"testmode":false,"default":"false","code":"bouncex.website.pts;","trigger":"pageload"},{"name":"click_thru_cpn","polling":"all","persist":"visit","page_types":[],"testmode":false,"default":"false","code":"null;","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":0,"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":"SinglePageApp.setCustomParams({\n currentPageIdentifier: function() {\n return window.location.href;\n }\n});\n\n(function(){\n /* wrike 783331164: cookie coupon from ibx clickthrough */\n var couponCode = bouncex.utils.url.getParam('coupon');\n if (couponCode.length > 0 && couponCode.indexOf('') === -1 && bouncex.utils.url.getParam('utm_source') === \"wunderkind\") {\n bouncex.updateBounceCookie(function (cookie) {\n if (!cookie) return;\n cookie.cpn = bouncex.utils.isObject(cookie.cpn) ? cookie.cpn : {};\n cookie.cpn['20_off'] = couponCode;\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"],"fme":true,"fmx":"","sdk":{"android":{"enabled":true,"enabledVersions":["1.0.8","1.2.0","1.2.1","1.2.5","1.1.0","1.1.4","1.3.0","1.3.2","1.3.3","1.3.4"],"eventModifications":[]},"ios":{"enabled":true,"enabledVersions":["1.0.8","1.2.0","1.1.0","1.1.4","1.2.5","1.3.0","1.3.2","1.3.3","1.3.4"],"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: 1 }; bouncex.assets = {"ads":"e2e1dbb7c70b701b3c197204872400a0","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.br.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_1247731b761376f768004922730ab4f3.br.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(); }})();