1!function r(a,o,i){function c(t,e){if(!o[t]){if(!a[t]){var n="function"==typeof require&&require;if(!e&&n)return n(t,!0);if(s)return s(t,!0);throw(e=new Error("Cannot find module '"+t+"'")).code="MODULE_NOT_FOUND",e}n=o[t]={exports:{}},a[t][0].call(n.exports,function(e){return c(a[t][1][e]||e)},n,n.exports,r,a,o,i)}return o[t].exports}for(var s="function"==typeof require&&require,e=0;e<i.length;e++)c(i[e]);return c}({1:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var s=!1;function r(){var e,t,n,r,a,o,i,c,l=document.getElementById("cartUpsellModal");l&&(s||(s=!0,e=l.querySelector(".cart-upsell-modal__overlay"),t=l.querySelector(".cart-upsell-modal__content"),n=l.querySelector(".cart-upsell-modal__close"),r=document.getElementById("modalProductImage"),a=document.getElementById("modalProductPrice"),o=document.getElementById("modalVariantSelect"),l._closeModal=i=function(){l.style.display="none",document.body.style.overflow=""},o.addEventListener("change",function(e){var e=e.target.options[e.target.selectedIndex],t=e.dataset.price,e=e.dataset.image;a.textContent=t,e&&(r.src=e)}),n.addEventListener("click",i),e.addEventListener("click",i),t.addEventListener("click",function(e){e.stopPropagation()}),(c=l.querySelector(".cart-upsell-modal__add-to-cart")).addEventListener("click",function(e){var t;e.preventDefault(),c.disabled||(e=o.value)&&(c.disabled=!0,t=c.textContent,c.textContent="Adding...",window.BabyVillageCart?BabyVillageCart.addToCart({variantId:e,quantity:1,buttonElement:c,onSuccess:function(e){console.log("Product added successfully from modal:",e),c.textContent="Added!",setTimeout(function(){c.disabled=!1,c.textContent=t,i()},500)},onError:function(e){console.error("Failed to add product from modal:",e),c.disabled=!1,c.textContent=t}}):(c.disabled=!1,c.textContent=t))})),document.querySelectorAll(".cart-upsell__body__product-list__item__content__select-button:not([data-upsell-initialized])").forEach(function(s){s.setAttribute("data-upsell-initialized","true"),s.addEventListener("click",function(e){e.stopPropagation();var t,n,r,a,o,i,e=s.closest(".cart-upsell__body__product-list__item"),e={handle:e.dataset.productHandle,title:e.dataset.productTitle,image:e.dataset.productImage,url:e.dataset.productUrl,optionName:e.dataset.optionName},c=JSON.parse(s.dataset.variants);e=e,c=c,t=document.getElementById("modalProductImage"),n=document.getElementById("modalProductTitle"),r=document.getElementById("modalProductPrice"),a=document.getElementById("modalVariantLabel"),o=document.getElementById("modalVariantSelect"),i=document.getElementById("modalViewProduct"),t.src=e.image,t.alt=e.title,n.textContent=e.title,i.href=e.url,a.textContent=e.optionName,o.innerHTML="",c.forEach(function(e){var t=document.createElement("option");t.value=e.id,t.textContent=e.option,t.dataset.price=e.price,t.dataset.image=e.image||"",t.disabled=!e.available,o.appendChild(t)}),(n=c.find(function(e){return e.available}))&&(r.textContent=n.price,o.value=n.id,n.image)&&(t.src=n.image),l.style.display="flex",document.body.style.overflow="hidden"})}),document.querySelectorAll(".cart-upsell__body__product-list__item__content__add-to-cart:not([data-upsell-initialized])").forEach(function(n){n.setAttribute("data-upsell-initialized","true"),n.addEventListener("click",function(e){var t;e.stopPropagation(),n.disabled||((e=n.closest(".cart-upsell__body__product-list__item").dataset.variantId)?(n.disabled=!0,t=n.textContent,n.textContent="Adding...",window.BabyVillageCart?BabyVillageCart.addToCart({variantId:e,quantity:1,buttonElement:n,onSuccess:function(e){console.log("Product added successfully:",e),n.textContent="Added!",setTimeout(function(){n.disabled=!1,n.textContent=t},1e3)},onError:function(e){console.error("Failed to add product:",e),n.disabled=!1,n.textContent=t}}):(console.error("BabyVillageCart global function not available"),n.disabled=!1,n.textContent=t)):console.error("Variant ID not found for product"))})}))}function a(){var r,n,a,o,i,c,s,l,u,d,f,m,e,t,p=document.querySelector(".cart-upsell");p&&(t=p.querySelector(".cart-upsell__body__product-list"),e=p.querySelectorAll(".cart-upsell__body__product-list__item"),p.querySelector(".cart-upsell__header__navigation-button.prev"),p.querySelector(".cart-upsell__header__navigation-button.next"),t)&&0!==e.length&&(e=t.cloneNode(!0),t.parentNode.replaceChild(e,t),r=p.querySelector(".cart-upsell__body__product-list"),n=p.querySelectorAll(".cart-upsell__body__product-list__item"),a=p.querySelector(".cart-upsell__header__navigation-button.prev"),o=p.querySelector(".cart-upsell__header__navigation-button.next"),l=!1,u=s=c=i=0,d=function(){var e=100*-i,t=8*i;r.style.transform="translateX(calc(".concat(e,"% - ").concat(t,"px))"),a.style.opacity=0===i?"0.5":"1",a.style.pointerEvents=0===i?"none":"auto",o.style.opacity=i===n.length-1?"0.5":"1",o.style.pointerEvents=i===n.length-1?"none":"auto"},f=function(e){i=Math.max(0,Math.min(e,n.length-1)),d()},a.addEventListener("click",function(){f(i-1)}),o.addEventListener("click",function(){f(i+1)}),m=function(e){return e.type.includes("mouse")?e.pageX:e.touches[0].clientX},e=function(e){var t;l&&(e.preventDefault(),s=m(e),e=100*-i+(s-c)/r.offsetWidth*100,t=8*i,r.style.transform="translateX(calc(".concat(e,"% - ").concat(t,"px))"))},t=function(){var e,t,n;l&&(l=!1,r.style.transition="",e=s-c,t=.2*r.offsetWidth,n=Math.abs(e)/(Date.now()-u),Math.abs(e)>t||.5<n?f(0<e?i-1:i+1):d())},r.addEventListener("mousedown",p=function(e){c=m(e),s=c,l=!0,u=Date.now(),r.style.transition="none"}),document.addEventListener("mousemove",e),document.addEventListener("mouseup",t),r.addEventListener("touchstart",p,{passive:!0}),r.addEventListener("touchmove",e,{passive:!1}),r.addEventListener("touchend",t),r.addEventListener("dragstart",function(e){return e.preventDefault()}),d())}n.default=function(){window.enableCartUpsell&&(r(),0==window.ssEnable)&&a();var e=new MutationObserver(function(e){e.forEach(function(e){0<e.addedNodes.length&&Array.from(e.addedNodes).some(function(e){var t;return 1===e.nodeType&&((null==(t=e.classList)?void 0:t.contains("cart-upsell"))||(null==(t=e.querySelector)?void 0:t.call(e,".cart-upsell")))})&&setTimeout(function(){window.enableCartUpsell&&(r(),0==window.ssEnable)&&a()},100)})}),t=document.querySelector("[data-ajax-cart-content]");t&&e.observe(t,{childList:!0,subtree:!0}),window.addEventListener("athos.ready.minicartRecs",function(){console.log("athos.ready.minicartRecs - cartUpsell reinitialised"),setTimeout(function(){window.enableCartUpsell&&(r(),0==window.ssEnable)&&a()},100)})}},{}],2:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=function(e){var t=$("#tdf_sale_widget");if(t.length)try{var n=$(t).find(".tdf_discount_tag"),r=$(n).text();(r.includes("Free Gift")||r.includes("Free gift")||r.includes("free gift"))&&$(e).append($("<input>").attr({type:"text",class:"hidden",name:"properties[Free Gift]",value:"Added"}))}catch(e){console.log("Error adding FreeGift field:",e)}}},{}],3:[function(e,t,n){"use strict";var r,a,o;Object.defineProperty(n,"__esModule",{value:!0}),n.default=function(){function n(){function r(e){for(var t,n,r={},r=e.jquery?(t=e.find("input[name='variant-id']").val(),n={},e.find(".property").each(function(){n[$(this).find(".property-name").text().replace(/:$/,"")]=$(this).find(".property-value").text()}),n):(t=e.variant_id,e.properties||{}),a=Object.keys(r).sort(),o=t,i=0;i<a.length;++i)o+="&"+encodeURIComponent(a[i])+"="+encodeURIComponent(r[a[i]]);return o}var a={},o=[];return $(".registry-variant:visible").each(function(){var e=r($(this)),t=null!=a[e]?a[e].quantity:0,e=(null!=a[e]&&a[e].line,function(e){e=parseInt(e.find(".registry-variant-quantity").val());return isNaN(e)?0:e}($(this))),n=(n=$(this),parseInt(n.find(".giftreggie-needs-quantity").text()));t!=e&&n<e&&o.push($(this).find(".giftreggie-item-name").text())}),o}$(".giftreggie-admin.giftreggie-guest").length&&!function(){var t=$(".registry-update-cart-modal");$(".registry-variant-quantity").keypress(function(e){if(13==e.which)return $("#registry-update-cart").trigger("click"),!1}),$("#registry-update-cart, #giftreggie-checkout").on("click",function(e){n().length&&!window.isConfirmed&&$.fancybox.open(t,{arrows:!1,gutter:"30px",modal:!0,showCloseButton:!0,enableEscapeButton:!0,hideOnOverlayClick:!0})}),$(".modal-confirm-button",t).on("click",function(){window.isConfirmed=!0,$("#registry-update-cart").trigger("click"),$.fancybox.close(t)}),$(".modal-close-button, .icon",t).on("click",function(){$.fancybox.close(t),window.isConfirmed=!1})}();$("#registry-show-minicart").on("click",function(){Shopify.theme.jsAjaxCart.updateView()}),($(".create-registry-form").length||$(".edit-registry-form").length)&&$('input[name="event-date"]').mask("00/00/0000")},(o=document.querySelector("#registry-protection"))&&(o.insertAdjacentHTML("beforebegin",'<div class="registry-protection__checkbox--unselected"></div>'),o.insertAdjacentHTML("beforebegin",'<div class="registry-protection__checkbox--selected"></div>'),r=document.querySelector(".registry-protection__checkbox--unselected"),(a=document.querySelector(".registry-protection__checkbox--selected")).insertAdjacentHTML("afterbegin",'<img class="registry-protection__checkbox-tick" src="https://cdn.shopify.com/s/files/1/0507/0559/6600/files/checkbox-tick.svg?v=1653531280" alt="tick">'),o.style.display="none",r.classList.add("active"),r.addEventListener("click",function(e){o.click(),o.checked=!0,r.classList.remove("active"),a.classList.add("active")}),a.addEventListener("click",function(e){o.click(),o.checked=!1,r.classList.add("active"),a.classList.remove("active")}))},{}],4:[function(require,module,exports){"use strict";function _typeof(e){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var _footer=_interopRequireDefault(require("./layout/footer.js")),_megaMenu=_interopRequireDefault(require("./layout/megaMenu.js")),_header=_interopRequireDefault(require("./layout/header.js")),_search=_interopRequireDefault(require("./search.js")),_lazyload=_interopRequireDefault(require("./helper/lazyload.js")),_giftreggieUpdate=_interopRequireDefault(require("./giftreggie-update")),_mobileSearchbar=_interopRequireDefault(require("./layout/mobileSearchbar")),_mobileSearchUpdate=_interopRequireDefault(require("./layout/mobileSearchUpdate")),_desktopSearchUpdate=_interopRequireDefault(require("./layout/desktopSearchUpdate")),_shogun=_interopRequireDefault(require("./shogun")),_rrPrint=_interopRequireDefault(require("./helper/rrPrint")),_freeGiftNotification=_interopRequireDefault(require("./freeGiftNotification")),_cartUpsell=_interopRequireDefault(require("./cartUpsell"));
vendor: 6,532 bytes, line 1
1function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _slicedToArray(e,t){return _arrayWithHoles(e)||_iterableToArrayLimit(e,t)||_unsupportedIterableToArray(e,t)||_nonIterableRest()}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _iterableToArrayLimit(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,a,o,i,c=[],s=!0,l=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;s=!1}else for(;!(s=(r=o.call(n)).done)&&(c.push(r.value),c.length!==t);s=!0);}catch(e){l=!0,a=e}finally{try{if(!s&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(l)throw a}}return c}}function _arrayWithHoles(e){if(Array.isArray(e))return e}function _createForOfIteratorHelper(e,t){var n,r,a,o,i="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(i)return r=!(n=!0),{s:function(){i=i.call(e)},n:function(){var e=i.next();return n=e.done,e},e:function(e){r=!0,a=e},f:function(){try{n||null==i.return||i.return()}finally{if(r)throw a}}};if(Array.isArray(e)||(i=_unsupportedIterableToArray(e))||t&&e&&"number"==typeof e.length)return i&&(e=i),o=0,{s:t=function(){},n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},f:t};throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _unsupportedIterableToArray(e,t){var n;if(e)return"string"==typeof e?_arrayLikeToArray(e,t):"Map"===(n="Object"===(n=Object.prototype.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:n)||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?_arrayLikeToArray(e,t):void 0}function _arrayLikeToArray(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function _regeneratorRuntime(){_regeneratorRuntime=function(){return i};var s,i={},e=Object.prototype,l=e.hasOwnProperty,u=Object.defineProperty||function(e,t,n){e[t]=n.value},t="function"==typeof Symbol?Symbol:{},r=t.iterator||"@@iterator",n=t.asyncIterator||"@@asyncIterator",a=t.toStringTag||"@@toStringTag";function o(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{o({},"")}catch(s){o=function(e,t,n){return e[t]=n}}function c(e,t,n,r){var a,o,i,c,t=t&&t.prototype instanceof v?t:v,t=Object.create(t.prototype),r=new j(r||[]);return u(t,"_invoke",{value:(a=e,o=n,i=r,c=f,function(e,t){if(c===p)throw Error("Generator is already running");if(c===h){if("throw"===e)throw t;return{value:s,done:!0}}for(i.method=e,i.arg=t;;){var n=i.delegate;if(n){n=function e(t,n){var r=n.method,a=t.iterator[r];if(a===s)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=s,e(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),y;r=d(a,t.iterator,n.arg);if("throw"===r.type)return n.method="throw",n.arg=r.arg,n.delegate=null,y;a=r.arg;return a?a.done?(n[t.resultName]=a.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=s),n.delegate=null,y):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,y)}(n,i);if(n){if(n===y)continue;return n}}if("next"===i.method)i.sent=i._sent=i.arg;else if("throw"===i.method){if(c===f)throw c=h,i.arg;i.dispatchException(i.arg)}else"return"===i.method&&i.abrupt("return",i.arg);c=p;n=d(a,o,i);if("normal"===n.type){if(c=i.done?h:m,n.arg===y)continue;return{value:n.arg,done:i.done}}"throw"===n.type&&(c=h,i.method="throw",i.arg=n.arg)}})}),t}function d(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}i.wrap=c;var f="suspendedStart",m="suspendedYield",p="executing",h="completed",y={};function v(){}function _(){}function g(){}var t={},b=(o(t,r,function(){return this}),Object.getPrototypeOf),b=b&&b(b(S([]))),w=(b&&b!==e&&l.call(b,r)&&(t=b),g.prototype=v.prototype=Object.create(t));function C(e){["next","throw","return"].forEach(function(t){o(e,t,function(e){return this._invoke(t,e)})})}function x(i,c){var t;u(this,"_invoke",{value:function(n,r){function e(){return new c(function(e,t){!function t(e,n,r,a){var o,e=d(i[e],i,n);if("throw"!==e.type)return(n=(o=e.arg).value)&&"object"==_typeof(n)&&l.call(n,"__await")?c.resolve(n.__await).then(function(e){t("next",e,r,a)},function(e){t("throw",e,r,a)}):c.resolve(n).then(function(e){o.value=e,r(o)},function(e){return t("throw",e,r,a)});a(e.arg)}(n,r,e,t)})}return t=t?t.then(e,e):e()}})}function k(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function $(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function j(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(k,this),this.reset(!0)}function S(t){if(t||""===t){var n,e=t[r];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length))return n=-1,(e=function e(){for(;++n<t.length;)if(l.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=s,e.done=!0,e}).next=e}throw new TypeError(_typeof(t)+" is not iterable")}return u(w,"constructor",{value:_.prototype=g,configurable:!0}),u(g,"constructor",{value:_,configurable:!0}),_.displayName=o(g,a,"GeneratorFunction"),i.isGeneratorFunction=function(e){e="function"==typeof e&&e.constructor;return!!e&&(e===_||"GeneratorFunction"===(e.displayName||e.name))},i.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,g):(e.__proto__=g,o(e,a,"GeneratorFunction")),e.prototype=Object.create(w),e},i.awrap=function(e){return{__await:e}},C(x.prototype),o(x.prototype,n,function(){return this}),i.AsyncIterator=x,i.async=function(e,t,n,r,a){void 0===a&&(a=Promise);var o=new x(c(e,t,n,r),a);return i.isGeneratorFunction(t)?o:o.next().then(function(e){return e.done?e.value:o.next()})},C(w),o(w,a,"Generator"),o(w,r,function(){return this}),o(w,"toString",function(){return"[object Generator]"}),i.keys=function(e){var t,n=Object(e),r=[];for(t in n)r.push(t);return r.reverse(),function e(){for(;r.length;){var t=r.pop();if(t in n)return e.value=t,e.done=!1,e}return e.done=!0,e}},i.values=S,j.prototype={constructor:j,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=s,this.done=!1,this.delegate=null,this.method="next",this.arg=s,this.tryEntries.forEac
1h($),!e)for(var t in this)"t"===t.charAt(0)&&l.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=s)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(n){if(this.done)throw n;var r=this;function e(e,t){return o.type="throw",o.arg=n,r.next=e,t&&(r.method="next",r.arg=s),!!t}for(var t=this.tryEntries.length-1;0<=t;--t){var a=this.tryEntries[t],o=a.completion;if("root"===a.tryLoc)return e("end");if(a.tryLoc<=this.prev){var i=l.call(a,"catchLoc"),c=l.call(a,"finallyLoc");if(i&&c){if(this.prev<a.catchLoc)return e(a.catchLoc,!0);if(this.prev<a.finallyLoc)return e(a.finallyLoc)}else if(i){if(this.prev<a.catchLoc)return e(a.catchLoc,!0)}else{if(!c)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return e(a.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;0<=n;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&l.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var a=r;break}}var o=(a=a&&("break"===e||"continue"===e)&&a.tryLoc<=t&&t<=a.finallyLoc?null:a)?a.completion:{};return o.type=e,o.arg=t,a?(this.method="next",this.next=a.finallyLoc,y):this.complete(o)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),y},finish:function(e){for(var t=this.tryEntries.length-1;0<=t;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),$(n),y}},catch:function(e){for(var t=this.tryEntries.length-1;0<=t;--t){var n,r,a=this.tryEntries[t];if(a.tryLoc===e)return"throw"===(n=a.completion).type&&(r=n.arg,$(a)),r}throw Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:S(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=s),y}},i}function asyncGeneratorStep(e,t,n,r,a,o,i){try{var c=e[o](i),s=c.value}catch(e){return void n(e)}c.done?t(s):Promise.resolve(s).then(r,a)}function _asyncToGenerator(c){return function(){var e=this,i=arguments;return new Promise(function(t,n){var r=c.apply(e,i);function a(e){asyncGeneratorStep(r,t,n,a,o,"next",e)}function o(e){asyncGeneratorStep(r,t,n,a,o,"throw",e)}a(void 0)})}}jQuery(function(){(0,_header.default)(),(0,_footer.default)(),(0,_megaMenu.default)(),(0,_search.default)(),(0,_lazyload.default)(),(0,_giftreggieUpdate.default)(),(0,_mobileSearchbar.default)(),(0,_mobileSearchUpdate.default)(),(0,_desktopSearchUpdate.default)(),(0,_shogun.default)(),(0,_rrPrint.default)(),(0,_cartUpsell.default)()});var _defineProperty=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e};function resetHeaderContHeight(){var e=null,t=setInterval(function(){(e=document.querySelector(".header-sticky-wrapper"))&&(clearInterval(t),e.style.height="auto")},300);setTimeout(function(){clearInterval(t)},3e3)}Shopify.theme.jsAjaxCart={init:function(e){Shopify.theme.jsAjaxCart=$.extend(this,Shopify.theme.getSectionData(e)),window.addEventListener("load",function(){fetch("/cart.js").then(function(e){return e.json()}).then(function(e){Shopify.theme.jsAjaxCart.updateShippingDates(e)}).catch(function(e){console.log(e)})}),isScreenSizeLarge()||"drawer"==this.cart_action?this.initializeAjaxCart():this.initializeAjaxCartOnMobile(),"drawer"==this.cart_action?(this.ajaxCartDrawer=$("[data-ajax-cart-drawer]"),$(document).on("click","[data-ajax-cart-trigger]",function(e){return e.preventDefault(),Shopify.theme.jsAjaxCart.showDrawer(),!1})):"mini_cart"==this.cart_action&&this.showMiniCartOnHover(),$(document).on("click",".ajax-submit",function(e){var l,u,d;if(e.preventDefault(),!$(this).hasClass("gwbutton"))return l=function(){var t,e=document.querySelectorAll(".product__custom-select");if(e.length)return t=!0,e.forEach(function(e){e.querySelector(".product__custom-select--selected").querySelector(".js_text").textContent.toLowerCase().includes("please")&&(t=!1)}),t},u=function(){var e=document.querySelector(".select-option-error");e&&(e.innerHTML="",e.style.display="none")},d=$(this).closest("form"),function(){var e=_asyncToGenerator(_regeneratorRuntime().mark(function e(){var t;return _regeneratorRuntime().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,fetch("/cart.js");case 2:if((t=e.sent).ok){e.next=5;break}throw new Error("Network response was not OK");case 5:return e.abrupt("return",t.json());case 7:case"end":return e.stop()}},e)}));return function(){return e.apply(this,arguments)}}()().then(function(e){var t,n,r,a,o,i,c,s=!1;
1e.items.forEach(function(e){e.properties&&e.properties.hasOwnProperty("gift registry")&&(s=!0)}),s?(document.body.insertAdjacentHTML("afterbegin",'<div class="combined-cart-popup"><div class="combined-cart-popup__inner-box"><p class="combined-cart-popup__title">Sorry!</p><p class="combined-cart-popup__text">You cannot combine a Gift Registry purchase with a normal purchase.</p><button class="combined-cart-popup__button">Continue Shopping</button></div></div>'),t=document.body,n=document.querySelector(".combined-cart-popup"),r=document.querySelector(".combined-cart-popup__inner-box"),a=document.querySelector(".combined-cart-popup__title"),o=document.querySelector(".combined-cart-popup__text"),e=document.querySelector(".combined-cart-popup__button"),n.style.cssText="\n position: fixed;\n top: 0;\n left: 0;\n z-index: 9999;\n width: 100%;\n height: 100vh;\n background-color: rgba(0, 0, 0, 0.85);\n display: flex;\n justify-content: center;\n align-items: center;\n overflow: hidden;\n ",798<window.innerWidth?r.style.cssText="\n width: 50%;\n text-align: center;\n background-color: white;\n padding: 2.5rem;\n ":r.style.cssText="\n width: 80%;\n text-align: center;\n background-color: white;\n padding: 2rem;\n ",a.style.cssText="\n color: #000000;\n font-family: 'CircularStd-Bold', sans-serif;\n font-size: 2rem;\n margin-bottom: 1rem;\n line-height: 1;\n ",o.style.cssText="\n color: black;\n font-family: 'CircularStd-Medium', sans-serif;\n font-size: 1.25rem;\n ",798<window.innerWidth?e.style.cssText="\n width: 60%;\n background-color: #000000;\n color: white;\n font-family: 'CircularStd-Medium', sans-serif;\n font-size: 1rem;\n border: none;\n outline: none;\n padding: 1rem;\n margin-top: 2rem;\n cursor: pointer;\n ":e.style.cssText="\n width: 100%;\n background-color: #000000;\n color: white;\n font-family: 'CircularStd-Medium', sans-serif;\n font-size: 1rem;\n border: none;\n outline: none;\n padding: 1rem;\n margin-top: 2rem;\n cursor: pointer;\n ",t.style.cssText="\n position: fixed;\n overflow: hidden;\n width: 100%;\n ",e.addEventListener("click",function(e){n.remove(),t.style.cssText="\n position: default;\n overflow: default;\n "}),window.addEventListener("click",function(e){e.target!=r&&e.target!=a&&e.target!=o&&(n.remove(),t.style.cssText="\n position: default;\n overflow: default;\n ")})):null==l()||1==l()?(u(),Shopify.theme.jsAjaxCart.addToCart(d)):(i=function(){var t=[],e=document.querySelectorAll(".product__custom-select");if(e.length)return e.forEach(function(e){e.querySelector(".product__custom-select--selected").querySelector(".js_text").textContent.toLocaleLowerCase().includes("please")&&(e=e.querySelector(".product__custom-select--title").textContent.toLowerCase(),t.push(e))}),t}()).length&&((c=document.querySelector(".select-option-error")).style.display="block",c.innerHTML="",1==i.length?i.forEach(function(e){var t=document.createElement("span");t.textContent="Please select a ".concat(e,"."),c.insertAdjacentElement("beforeend",t)}):i.forEach(function(e,t){var n;0==t?((n=document.createElement("span")).textContent="Please select a ".concat(e," and "),c.insertAdjacentElement("beforeend",n)):t<i.length-1?((n=document.createElement("span")).textContent="a ".concat(e," and "),c.insertAdjacentElement("beforeend",n)):((t=document.createElement("span")).textContent="a ".concat(e,"."),c.insertAdjacentElement("beforeend",t))}))}).catch(function(e){console.log(e)}),!1}),$(document).on("click","[data-ajax-cart-delete]",function(e){e.preventDefault();var t=$(this).parents("[data-line-item]").data("line-item"),e=e.target.closest("[data-cart-item]").getAttribute("data-cart-item");return Shopify.theme.jsAjaxCart.removeFromCart(t,e),Shopify.theme.jsCart&&Shopify.theme.jsCart.removeFromCart(t,e),!1}),$(document).on("click","[data-ajax-cart-close]",function(e){return e.preventDefault(),Shopify.theme.jsAjaxCart.hideDrawer(),Shopify.theme.jsAjaxCart.hideMiniCart(),!1}),$(".mobile-cart__sheild").click(function(e){$(e.target).closest(".ajax-cart.ajax-cart--drawer").length||$(".ajax-cart__close-icon").click()})}
1,showMiniCartOnHover:function(){var e=$("[data-ajax-cart-trigger]");e.hover(function(){("centered"==Shopify.theme_settings.header_layout&&$(".header-sticky-wrapper").hasClass("is-sticky")?$(".header-sticky-wrapper [data-ajax-cart-trigger]"):e).addClass("show-mini-cart")},function(){e.removeClass("show-mini-cart")})},hideMiniCart:function(){if("mini_cart"!=this.cart_action)return!1;$("[data-ajax-cart-close]").parents("[data-ajax-cart-trigger]").removeClass("show-mini-cart")},toggleMiniCart:function(){var n=$(".mobile-header [data-ajax-cart-trigger]");n.attr("href","#"),n.off("click").on("click",function(e){var t;e.target.closest("[data-ajax-cart-mini_cart]")||(Shopify.theme.jsAjaxCart.initializeAjaxCartOnMobile(),n.toggleClass("show-mini-cart"),e=0,t=parseInt($(".mobile-header").height()),void 0!==Shopify.theme.jsAnnouncementBar&&Shopify.theme.jsAnnouncementBar.enable_sticky&&(e=Shopify.theme.jsAnnouncementBar.getAnnouncementHeight()),$(".mobile-header .theme-ajax-cart").css({height:"calc(100vh - ".concat(t+e,"px)")}))})},showDrawer:function(){var a=document.querySelectorAll(".cart__count--text"),o=document.querySelector(".ajax-cart__empty-cart-message"),i=document.querySelector(".ajax-cart__form");if(fetch("/cart.js").then(function(e){return e.json()}).then(function(e){var t=0,n=0,r=(e.items.forEach(function(e){n+=e.quantity,e.properties&&1==e.properties._mw_is_variant&&(t+=e.quantity)}),n-t);a.forEach(function(e){e.textContent=r}),0<r?(o.classList.add("is-hidden"),i.classList.remove("is-hidden")):(o.classList.remove("is-hidden"),i.classList.add("is-hidden"))}).catch(function(e){console.log(e)}),"drawer"!=this.cart_action)return!1;this.ajaxCartDrawer.addClass("is-visible"),$(".ajax-cart__overlay").addClass("is-visible"),$("html").addClass("minicart-open"),$(".mobile-cart__sheild").removeClass("invisible")},hideDrawer:function(){if("drawer"!=this.cart_action)return!1;this.ajaxCartDrawer.removeClass("is-visible"),$(".ajax-cart__overlay").removeClass("is-visible"),$("html").removeClass("minicart-open"),$(".mobile-cart__sheild").addClass("invisible")},removeFromCart:function removeFromCart(lineID,itemKey,callback){console.log("removeFromCart!! global.js"),$.ajax({type:"POST",url:"/cart/change.js",data:"quantity=0&line="+lineID,dataType:"json",success:function(e){Shopify.theme.jsAjaxCart.updateView()},error:function error(XMLHttpRequest,textStatus){var response=eval("("+XMLHttpRequest.responseText+")");response.description}})},addDates:function(){var r=_asyncToGenerator(_regeneratorRuntime().mark(function e(t,n,r){var a,o;return _regeneratorRuntime().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return(o=t.properties)["EXPECTED TO SHIP"]=r,o={line:n+1,quantity:t.quantity,properties:o},e.next=5,fetch("/cart/change.js",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(o)});case 5:if((a=e.sent).ok){e.next=8;break}throw new Error("Error adding date: ".concat(a.statusText));case 8:return e.next=10,a.json();case 10:return o=e.sent,e.abrupt("return",o);case 12:case"end":return e.stop()}},e)}));return function(e,t,n){return r.apply(this,arguments)}}(),fetchVariantMetafield:function(){var r=_asyncToGenerator(_regeneratorRuntime().mark(function e(t,n,r){var a,o,i,c,s;return _regeneratorRuntime().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return o='\n query {\n product(id: "gid://shopify/Product/'.concat(n,'") {\n variants(first: 20) {\n edges {\n node {\n id\n date: metafield(key: "date", namespace: "global") {\n value\n }\n availability: metafield(key: "available_warehouse", namespace: "global") {\n value\n }\n }\n }\n }\n }\n }\n '),e.next=3,fetch("https://".concat(Shopify.shop,"/api/2025-01/graphql"),{method:"POST",headers:{"Content-Type":"application/graphql","X-Shopify-Storefront-Access-Token":t},body:o});case 3:if((a=e.sent).ok){e.next=6;break}throw new Error("Error fetching metafield: ".concat(a.statusText));case 6:return e.next=8,a.json();case 8:return o=e.sent,s=o.data.product.variants.edges,c=i=null,s.forEac
1h(function(e){if(e.node.id.split("/")[4]==r){if(!e.node.date||!e.node.availability)throw new Error("Variant has no date and availability metafields");i=e.node.date.value,c=e.node.availability.value}}),s={date:i,availability:c},e.abrupt("return",s);case 15:case"end":return e.stop()}},e)}));return function(e,t,n){return r.apply(this,arguments)}}(),addBundleDates:function(){var t=_asyncToGenerator(_regeneratorRuntime().mark(function e(s){var l,t,n;return _regeneratorRuntime().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(n=function(){return(n=_asyncToGenerator(_regeneratorRuntime().mark(function e(){var t,n,r,a,o,i,c;return _regeneratorRuntime().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:t=_createForOfIteratorHelper(s.items),e.prev=1,t.s();case 3:if((n=t.n()).done){e.next=36;break}if(n=n.value,r=s.items.indexOf(n),!(n.properties&&(1==n.properties._mw_is_variant||"1"==n.properties._mw_is_variant||n.properties._mw_marketing_offers_offer_id))){e.next=34;break}for(o in a=!1,n.properties)(o.includes("Est.")||o.includes("EXPECTED TO SHIP"))&&(a=!0);if(a){e.next=34;break}return e.prev=10,e.next=13,Shopify.theme.jsAjaxCart.fetchVariantMetafield(l,n.product_id,n.variant_id);case 13:if(c=e.sent,i=c.availability,c=c.date,i&&"n"==i){if(c)return e.next=20,Shopify.theme.jsAjaxCart.addDates(n,r,c);e.next=25}else e.next=28;break;case 20:console.log("ð mrmr Date added!!"),Shopify.theme.jsAjaxCart.updateView(!1),e.next=26;break;case 25:console.log("ð mrmr Variant has no global.date metafield");case 26:e.next=29;break;case 28:console.log("ð mrmr Variant is available, No need to add date");case 29:e.next=34;break;case 31:e.prev=31,e.t0=e.catch(10),console.error("Error:",e.t0);case 34:e.next=3;break;case 36:e.next=41;break;case 38:e.prev=38,e.t1=e.catch(1),t.e(e.t1);case 41:return e.prev=41,t.f(),e.finish(41);case 44:case"end":return e.stop()}},e,null,[[1,38,41,44],[10,31]])}))).apply(this,arguments)},t=function(){return n.apply(this,arguments)},console.log("ð mrmr addBundleDates!! global.js"),l=Shopify.theme.shopify_graphql_api_key_ready_only){e.next=7;break}return console.error("GraphQL token not found"),e.abrupt("return");case 7:t().then(function(){console.log("All dates added!!")}).catch(function(e){console.error("Error:",e)});case 8:case"end":return e.stop()}},e)}));return function(e){return t.apply(this,arguments)}}(),updateShippingDates:function(){var t=_asyncToGenerator(_regeneratorRuntime().mark(function e(s){var l,t,n;return _regeneratorRuntime().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(n=function(){return(n=_asyncToGenerator(_regeneratorRuntime().mark(function e(){var t,n,r,a,o,i,c;return _regeneratorRuntime().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:t=_createForOfIteratorHelper(s.items),e.prev=1,t.s();case 3:if((r=t.n()).done){e.next=35;break}for(o in n=r.value,r=s.items.indexOf(n),a=null,n.properties)(o.includes("Est.")||o.includes("EXPECTED TO SHIP"))&&(a=n.properties[o]);return e.prev=9,e.next=12,Shopify.theme.jsAjaxCart.fetchVariantMetafield(l,n.product_id,n.variant_id);case 12:if(c=e.sent,i=c.availability,c=c.date,i&&"n"==i){if(c&&c!=a)return e.next=19,Shopify.theme.jsAjaxCart.addDates(n,r,c);e.next=24}else e.next=27;break;case 19:console.log("ð mrmr Date added!!"),Shopify.theme.jsAjaxCart.updateView(!1),e.next=25;break;case 24:console.log("ð mrmr Variant has no global.date metafield or date is same as existing date");case 25:e.next=28;break;case 27:console.log("ð mrmr Variant is available, No need to add date");case 28:e.next=33;break;case 30:e.prev=30,e.t0=e.catch(9),console.error("Error:",e.t0);case 33:e.next=3;break;case 35:e.next=40;break;case 37:e.prev=37,e.t1=e.catch(1),t.e(e.t1);case 40:return e.prev=40,t.f(),e.finish(40);case 43:case"end":return e.stop()}},e,null,[[1,37,40,43],[9,30]])}))).apply(this,arguments)},t=function(){return n.apply(this,arguments)},console.log("ð mrmr updateShippingDates!! global.js"),l=Shopify.theme.shopify_graphql_api_key_ready_only){e.next=7;break}return console.error("GraphQL token not found"),e.abrupt("return");case 7:t().then(function(){console.log("All dates added!!")}
1).catch(function(e){console.error("Error:",e)});case 8:case"end":return e.stop()}},e)}));return function(e){return t.apply(this,arguments)}}(),initializeAjaxCart:function(){Shopify.theme.asyncView.load("/cart","ajax").done(function(e){var t=e.html;e.options;$("[data-ajax-cart-content]").html(t.content),Shopify.theme_settings.show_multiple_currencies&&convertCurrencies()}).fail(function(e){console.log(e)})},initializeAjaxCartOnMobile:function(){this.toggleMiniCart(),Shopify.theme.asyncView.load("/cart","ajax").done(function(e){var t=e.html;e.options;$(".mobile-header [data-ajax-cart-content]").html(t.content),Shopify.theme_settings.show_multiple_currencies&&convertCurrencies()}).fail(function(e){console.log(e)})},addToCart:function addToCart($addToCartForm){console.log("addToCart!! global.js"),$('select[name="id"]').length&&$addToCartForm.find($('input[name="id"].default-variant-value')).remove();var $addToCartBtn=$addToCartForm.find(".button--add-to-cart");(0,_freeGiftNotification.default)($addToCartForm),$.ajax({url:"/cart/add.js",dataType:"json",cache:!1,type:"post",data:$addToCartForm.serialize(),beforeSend:function(){$addToCartBtn.attr("disabled","disabled").addClass("disabled"),$addToCartBtn.find("span").removeClass("fadeInDown").addClass("animated zoomOut")},success:function(t){var e,n=$("[data-ajax-cart-trigger]");function r(){isScreenSizeLarge()?n=$("[data-ajax-cart-trigger]"):(n=$(".mobile-header [data-ajax-cart-trigger]"),Shopify.theme.scrollToTop(n)),n.addClass("show-mini-cart"),$addToCartBtn.find("span").removeClass("fadeInDown")}if($addToCartBtn.find(".checkmark").addClass("checkmark-active"),window.setTimeout(function(){$addToCartBtn.removeAttr("disabled").removeClass("disabled"),$addToCartBtn.find(".checkmark").removeClass("checkmark-active"),$addToCartBtn.find(".text, .icon").removeClass("zoomOut").addClass("fadeInDown"),$addToCartBtn.on("webkitAnimationEnd oanimationend msAnimationEnd animationend",r)},1e3),Shopify.theme.jsAjaxCart.showDrawer(),Shopify.theme.jsAjaxCart.updateView(),Shopify.theme.jsCart&&$.ajax((_defineProperty(e={dataType:"json",async:!1,cache:!1},"dataType","html"),_defineProperty(e,"url","/cart"),_defineProperty(e,"success",function(e){e=$(e).find(".cart__form");$(".cart__form").replaceWith(e),Shopify.theme_settings.show_multiple_currencies&&convertCurrencies()}),e)),!window.klaviyo){window._klOnsite=window._klOnsite||[];try{window.klaviyo=new Proxy({},{get:function(e,a){return"push"===a?function(){var e;(e=window._klOnsite).push.apply(e,arguments)}:function(){for(var e=arguments.length,n=new Array(e),t=0;t<e;t++)n[t]=arguments[t];var r="function"==typeof n[n.length-1]?n.pop():void 0;return new Promise(function(t){window._klOnsite.push([a].concat(n,[function(e){r&&r(e),t(e)}]))})}}})}catch(e){window.klaviyo=window.klaviyo||[],window.klaviyo.push=function(){var e;(e=window._klOnsite).push.apply(e,arguments)}}}var a,o,i=$addToCartForm.find('input[name="quantity"]').val();$.ajax({url:"/cart.js",dataType:"json",cache:!1,type:"get",success:function(e){a=e.items.map(function(e){return e.title}),o=e.items.map(function(e){return{ProductID:e.id,SKU:e.sku,ProductName:e.title,Quantity:e.quantity,ItemPrice:e.final_price/100,RowTotal:e.final_line_price/100,ProductURL:e.url,ImageURL:e.featured_image,ProductCategories:e.product_type}});e={$value:t.final_price/100,AddedItemProductName:t.title,AddedItemProductID:t.id,AddedItemSKU:t.sku,AddedItemCategories:t.product_type,AddedItemImageURL:t.featured_image,AddedItemURL:t.url,AddedItemPrice:t.final_price/100,AddedItemQuantity:i,ItemNames:a,CheckoutURL:"".concat(window.location.origin,"/checkout"),Items:o};klaviyo.track("Added to Cart",e)},error:function(e){console.log("error",e)}})},error:function error(XMLHttpRequest){var response=eval("("+XMLHttpRequest.responseText+")"),cartWarning,cartWarning,response=response.description;cartWarning=window.location.href.includes("products")?"<p style='margin-bottom: 1rem;' class='cart-warning__message animated bounceIn'>It looks like you've added too many to the cart. We've updated the quantity to the maximum amount available.</p>":'<p class="cart-warning__message animated bounceIn">'.concat(response.replace("All 1 ","All "),"</p>"),$(".warning").remove(),$addToCartForm.find(".cart-warning").html(cartWarning),$addToCartBtn.removeAttr("disabled").removeClass("disabled"),$addToCartBtn.find(".icon").removeClass("zoomOut").addClass("zoomIn"),$addToCartBtn.find(".text").text(Shopify.translation.addToCart).removeClass("zoomOut").addClass("zoomIn")}})},updateView:function(i){console.log("updateView!! global.js"),Shopify.theme.asyncView.load("/cart","ajax").done(function(e){var o=e.html;
1e.options;fetch("/cart.js").then(function(e){return e.json()}).then(function(e){var t,n,r=0,a=(e.items.forEach(function(e){r+=e.quantity}),r);0<a?(t=$(o.content).find(".ajax-cart__list"),n=$(o.content).find(".ajax-cart__details-price-wrapper"),$(".ajax-cart__list").replaceWith(t),$(".ajax-cart__details-price-wrapper").replaceWith(n),$(".ajax-cart__empty-cart-message").addClass("is-hidden"),$(".ajax-cart__form").removeClass("is-hidden"),$("[data-ajax-cart-trigger]").addClass("has-cart-count"),$('[data-bind="itemCount"]').text(a)):($(".ajax-cart__empty-cart-message").removeClass("is-hidden"),$(".ajax-cart__form").addClass("is-hidden"),$("[data-ajax-cart-trigger]").removeClass("has-cart-count"),$('[data-bind="itemCount"]').text("0")),null!=i&&1==i&&Shopify.theme.jsAjaxCart.addBundleDates(e)}).finally(function(){var e=document.querySelector(".cart__page-update-button a");e&&e.classList.remove("disabled")}).catch(function(e){console.log(e)}),Shopify.theme_settings.show_multiple_currencies&&convertCurrencies()}).fail(function(){})},unload:function(e){$(".ajax-submit").off(),$("[data-ajax-cart-delete]").off()}},window.addEventListener("load",function(){resetHeaderContHeight()}),window.BabyVillageCart={addToCart:function(){var t=_asyncToGenerator(_regeneratorRuntime().mark(function e(t){var n,r,a,o,i,c,s,l,u,d;return _regeneratorRuntime().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(console.log("BabyVillageCart.addToCart called with options:",t),t.formElement||t.variantId){e.next=4;break}return console.error("BabyVillageCart.addToCart requires either formElement or variantId"),e.abrupt("return");case 4:if(t.formElement)r=$(t.formElement),n=r.serialize();else{if((a=new URLSearchParams).append("id",t.variantId),a.append("quantity",t.quantity||1),t.properties)for(o=0,i=Object.entries(t.properties);o<i.length;o++)s=_slicedToArray(i[o],2),c=s[0],s=s[1],a.append("properties[".concat(c,"]"),s);n=a.toString()}return l=t.buttonElement?$(t.buttonElement):r?r.find(".button--add-to-cart"):null,e.prev=6,e.next=9,fetch("/cart.js").then(function(e){return e.json()});case 9:if(u=e.sent,d=!1,u.items.forEach(function(e){e.properties&&e.properties.hasOwnProperty("gift registry")&&(d=!0)}),d)return this._showGiftRegistryPopup(),t.onError&&t.onError({message:"Cannot combine gift registry with normal purchase"}),e.abrupt("return");e.next=16;break;case 16:if(r&&!this._validateOptions(r))return t.onError&&t.onError({message:"Please select all required options"}),e.abrupt("return");e.next=19;break;case 19:return e.next=21,this._performAddToCart(n,l,t);case 21:e.next=27;break;case 23:e.prev=23,e.t0=e.catch(6),console.error("Error checking cart:",e.t0),t.onError&&t.onError(e.t0);case 27:case"end":return e.stop()}},e,this,[[6,23]])}));return function(e){return t.apply(this,arguments)}}(),_validateOptions:function(e){e=e[0].querySelectorAll(".product__custom-select");if(e.length){var t=!0,n=[];if(e.forEach(function(e){e.querySelector(".product__custom-select--selected").querySelector(".js_text").textContent.toLowerCase().includes("please")&&(t=!1,e=e.querySelector(".product__custom-select--title"),n.push(e.textContent.toLowerCase()))}),!t)return this._displayOptionError(n),!1;this._removeOptionError()}return!0},_displayOptionError:function(n){var r,e=document.querySelector(".select-option-error");e&&n.length&&(e.style.display="block",e.innerHTML="",1===n.length?e.innerHTML="<span>Please select a ".concat(n[0],".</span>"):(r="Please select ",n.forEach(function(e,t){0===t?r+="a ".concat(e):t<n.length-1?r+=" and a ".concat(e):r+=" and a ".concat(e,".")}),e.innerHTML="<span>".concat(r,"</span>")))},_removeOptionError:function(){var e=document.querySelector(".select-option-error");e&&(e.innerHTML="",e.style.display="none")},_showGiftRegistryPopup:function(){function t(){e.remove(),document.body.style.cssText="position: default; overflow: default;"}document.body.insertAdjacentHTML("afterbegin",'\n <div class="combined-cart-popup">\n <div class="combined-cart-popup__inner-box">\n <p class="combined-cart-popup__title">Sorry!</p>\n <p class="combined-cart-popup__text">You cannot combine a Gift Registry purchase with a normal purchase.</p>\n <button class="combined-cart-popup__button">Continue Shopping</button>\n </div>\n </div>\n ');var e=document.querySelector(".combined-cart-popup"),n=e.querySelector(".combined-cart-popup__inner-box"),r=e.querySelector(".combined-cart-popup__button");e.style.cssText="\n position: fixed; top: 0; left: 0; z-index: 9999;\n width: 100%; height: 100vh;\n background-color: rgba(0, 0, 0, 0.85);\n display: flex; justify-content: center; align-items: center;\n overflow: hidden;\n ",n.style.cssText=798<window.innerWidth?"width: 50%; text-align: center; background-color: white; padding: 2.5rem;":"width: 80%; text-align: center; background-color: white; padding: 2rem;",e.querySelector(".combined-cart-popup__title").style.cssText="\n color: #000000; font-family: 'CircularStd-Bold', sans-serif;\n font-size: 2rem; margin-bottom: 1rem; line-height: 1;\n ",e.querySelector(".combined-cart-popup__text").style.cssText="\n color: black; font-family: 'CircularStd-Medium', sans-serif;\n font-size: 1.25rem;\n ",r.style.cssText=798<window.innerWidth?"width: 60%; background-color: #000000; color: white;\n font-family: 'CircularStd-Medium', sans-serif; font-size: 1rem;\n border: none; outline: none; padding: 1rem; margin-top: 2rem; cursor: pointer;":"width: 100%; background-color: #000000; color: white;\n font-family: 'CircularStd-Medium', sans-serif; font-size: 1rem;\n border: none; outline: none; padding: 1rem; margin-top: 2rem; cursor: pointer;",document.body.style.cssText="position: fixed; overflow: hidden; width: 100%;";r.addEventListener("click",t),e.addEventListener("click",function(e){n.contains(e.target)||t()})},_performAddToCart:function(){var r=_asyncToGenerator(_regeneratorRuntime().mark(function e(t,n,r){var a,o,i,c,s;return _regeneratorRuntime().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return(a=r.formElement?$(r.formElement):null)&&"function"==typeof _freeGiftNotification.default&&(0,_freeGiftNotification.default)(a),n&&n.length&&(n.attr("disabled","disabled").addClass("disabled"),n.find("span").removeClass("fadeInDown").addClass("animated zoomOut")),e.prev=3,e.next=6,fetch("/cart/add.js",{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:t});case 6:if((o=e.sent).ok){e.next=12;break}return e.next=10,o.json();case 10:throw e.sent;case 12:return e.next=14,o.json();case 14:if(i=e.sent,n&&n.length&&(n.find(".checkmark").addClass("checkmark-active"),setTimeout(function(){n.removeAttr("disabled").removeClass("disabled"),n.find(".checkmark").removeClass("checkmark-active"),n.find(".text, .icon").removeClass("zoomOut").addClass("fadeInDown")}
1,1e3)),Shopify.theme.jsAjaxCart&&(Shopify.theme.jsAjaxCart.showDrawer(),Shopify.theme.jsAjaxCart.updateView()),Shopify.theme.jsCart)return e.next=20,fetch("/cart").then(function(e){return e.text()});e.next=24;break;case 20:c=e.sent,c=$(c).find(".cart__form"),$(".cart__form").replaceWith(c),Shopify.theme_settings.show_multiple_currencies&&"function"==typeof convertCurrencies&&convertCurrencies();case 24:this._trackKlaviyoAddToCart(i,r.quantity||1),r.onSuccess&&r.onSuccess(i),console.log("Product added to cart successfully:",i),e.next=35;break;case 29:e.prev=29,e.t0=e.catch(3),console.error("Error adding to cart:",e.t0),a&&a.length&&(c=e.t0.description||"Unable to add item to cart",c=window.location.href.includes("products")?"It looks like you've added too many to the cart. We've updated the quantity to the maximum amount available.":c.replace("All 1 ","All "),s='<p class="cart-warning__message animated bounceIn">'.concat(c,"</p>"),$(".warning").remove(),a.find(".cart-warning").html(s)),n&&n.length&&(n.removeAttr("disabled").removeClass("disabled"),n.find(".icon").removeClass("zoomOut").addClass("zoomIn"),n.find(".text").text((null==(s=Shopify.translation)?void 0:s.addToCart)||"Add to Cart").removeClass("zoomOut").addClass("zoomIn")),r.onError&&r.onError(e.t0);case 35:case"end":return e.stop()}},e,this,[[3,29]])}));return function(e,t,n){return r.apply(this,arguments)}}(),_trackKlaviyoAddToCart:function(){var n=_asyncToGenerator(_regeneratorRuntime().mark(function e(t,n){var r,a;return _regeneratorRuntime().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,!window.klaviyo&&!window.klaviyo){window._klOnsite=window._klOnsite||[];try{window.klaviyo=new Proxy({},{get:function(e,a){return"push"===a?function(){var e;(e=window._klOnsite).push.apply(e,arguments)}:function(){for(var e=arguments.length,n=new Array(e),t=0;t<e;t++)n[t]=arguments[t];var r="function"==typeof n[n.length-1]?n.pop():void 0;return new Promise(function(t){window._klOnsite.push([a].concat(n,[function(e){r&&r(e),t(e)}]))})}}})}catch(e){window.klaviyo=window.klaviyo||[],window.klaviyo.push=function(){var e;(e=window._klOnsite).push.apply(e,arguments)}}}return e.next=4,fetch("/cart.js").then(function(e){return e.json()});case 4:r=e.sent,a=r.items.map(function(e){return e.title}),r=r.items.map(function(e){return{ProductID:e.id,SKU:e.sku,ProductName:e.title,Quantity:e.quantity,ItemPrice:e.final_price/100,RowTotal:e.final_line_price/100,ProductURL:e.url,ImageURL:e.featured_image,ProductCategories:e.product_type}}),a={$value:t.final_price/100,AddedItemProductName:t.title,AddedItemProductID:t.id,AddedItemSKU:t.sku,AddedItemCategories:t.product_type,AddedItemImageURL:t.featured_image,AddedItemURL:t.url,AddedItemPrice:t.final_price/100,AddedItemQuantity:n,ItemNames:a,CheckoutURL:"".concat(window.location.origin,"/checkout"),Items:r},window.klaviyo.track("Added to Cart",a),console.log("Klaviyo tracking sent"),e.next=15;break;case 12:e.prev=12,e.t0=e.catch(0),console.warn("Klaviyo tracking failed:",e.t0);case 15:case"end":return e.stop()}},e,null,[[0,12]])}));return function(e,t){return n.apply(this,arguments)}}()},void 0!==module&&module.exports&&(module.exports=window.BabyVillageCart)},{"./cartUpsell":1,"./freeGiftNotification":2,"./giftreggie-update":3,"./helper/lazyload.js":5,"./helper/rrPrint":6,"./layout/desktopSearchUpdate":7,"./layout/footer.js":8,"./layout/header.js":9,"./layout/megaMenu.js":10,"./layout/mobileSearchUpdate":11,"./layout/mobileSearchbar":12,"./search.js":13,"./shogun":14}],5:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=function(){$("body").on("scroll mouseover",function e(){$(".mr-lazy-load:not(.lazyloaded)").length||$("body").off("scroll mouseover",e),$(".mr-lazy-load").each(function(){$(this).hasClass("lazyloaded")||($(this).attr("src",$(this).data("src")),$(this).addClass("lazyloaded"))})})}},{}],6:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=function(){$("body").on("click",".rr--print_cta .shg-btn",function(){window.print()})}},{}],7:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=function(){function e(){var t=document.querySelector("#header"),n=t.querySelector(".search-form .input"),r=null,a=setInterval(function(){var e;(r=t.querySelector(".ss__autocomplete--target"))&&(e=function(e,t){e.addEventListener(t,function(){var e=setInterval(function(){r.children.length?(clearInterval(e),r.style.backgroundColor="rgba(0, 0, 0, 0.7)"):r.style.backgroundColor="transparent"},300);setTimeout(function(){clearInterval(e)},3e3)})},clearInterval(a),t.insertAdjacentElement("beforeend",r),e(n,"keydown"),e(n,"focu
1s"),e(n,"focusout"),e(window,"mousemove"),e(window,"scroll"),e(window,"click"))},300);setTimeout(function(){clearInterval(a)},5e3)}992<=window.innerWidth&&e();q,window.addEventListener("resize",function(){992<=window.innerWidth&&e()})}},{}],8:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=function(){$(".block__link-list").click(function(e){$(e.target).is(".footer__heading")&&($(this).find("ul").slideToggle("fast"),$(this).find(".footer__heading").toggleClass("active"))})}},{}],9:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=function(){$(window).on("load",function(){var t,n=0,r=setInterval(function(){if(40<++n&&clearInterval(r),window.gift_reggie){clearInterval(r);try{t=window.gift_reggie.wishlist_button.wishlist.id}catch(e){console.log("wishlist_id = window.gift_reggie.wishlist_button.wishlist.id was empty",e)}var e="/apps/giftregistry/wishlist/".concat(t);$(".header__link.action-area__link.wishlist").attr("href",e)}},100)}),$(document).ready(function(){$(".header__account--customer-icon").on("click",function(){$(this).hasClass("active")?($(".header__account--customer-menu").removeClass("active"),$(".header__account--customer-icon").removeClass("active")):($(".header__account--customer-menu").addClass("active"),$(".header__account--customer-icon").addClass("active"))}),$(document).click(function(e){var t=$(".header__account--customer"),n=$(".header__link--gift-registry");t.is(e.target)||0!==t.has(e.target).length||($(".header__account--customer-menu").removeClass("active"),$(".header__account--customer-icon").removeClass("active")),n.is(e.target)||0!==n.has(e.target).length||$(".header__link--gift-registry-menu").removeClass("active")})})}},{}],10:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=function(){$(window).on("load resize",function(){$(window).width()<992?($(".sub-mega-menu-back").on("click",function(){$(this).hasClass("level-three")?($(".sub__mega-menu--container").find(".mega-menu__link-content--block.level-three").removeClass("active"),setTimeout(function(){$(".sub__mega-menu--container").find(".mega-menu__link-content--block.level-three").addClass("invisible")},200)):($(".sub__mega-menu--container").find(".mega-menu__link-content--block").removeClass("active"),$(".mega-menu-mobile-menu__list").removeClass("mega-menu-nowonlevel2"))}),$(".sub-mega-menu-selector").click(function(e){$(this).hasClass("sub-menu-mobile-gift")||(e.preventDefault(),$(".sub__mega-menu--container").find(".mega-menu__link-content--block").removeClass("active"),t=$(this).attr("class").split(" ")[1],setTimeout(function(){$("."+t).addClass("active")},200));var t,n=null==(e=e.currentTarget.attributes["data-collection-title"].value)?void 0:e.toLowerCase(),e=$(".mega-menu__link-content--block");e.length&&e.map(function(e,t){n&&-1!==(null==(t=$(t).attr("for"))?void 0:t.replace("mega-menu__link-content-","").toLowerCase().indexOf(n))&&($(".mega-menu-mobile-menu__list").addClass("mega-menu-nowonlevel2"),setTimeout(function(){},50))})}),$(".level-two-megamenu-selector").on("click",function(e){if(!$(this).hasClass("red-arrow"))return!0;$(".sub__mega-menu--container").find(".mega-menu__link-content--block.level-three").removeClass("active");var t=$(this).data("levelthree");$("."+t).removeClass("invisible"),setTimeout(function(){$("."+t).addClass("active")},200)}),$(".mega-menu-mobile-firstlevel-labelProducts").on("click",function(e){$(".mega-menu-mobile-firstlevel-labelProducts").addClass("active"),$(".mega-menu-mobile-firstlevel-labelBrands").removeClass("active"),$(".mega-menu-mobile-menu__item-PRODUCTS").click()}),$(".mega-menu-mobile-firstlevel-labelBrands").on("click",function(e){$(".mega-menu-mobile-firstlevel-labelProducts").removeClass("active"),$(".mega-menu-mobile-firstlevel-labelBrands").addClass("active"),$(".mega-menu-mobile-menu__item-BRANDS").click()})):($(".sub__mega-menu--container").find(".mega-menu__link-content--block").removeClass("active"),$(".sub-mega-menu-content--1").addClass("active"),$(".sub-mega-menu-selector").mou
1seover(function(){$(".sub__mega-menu--container").find(".mega-menu__link-content--block").removeClass("active");var e=$(this).attr("class").split(" ")[1];$("."+e).addClass("active")}))}),$(".mobile-header__close-icon").on("click",function(){$(".sub__mega-menu--container").find(".mega-menu__link-content--block").removeClass("active"),$(".mobile-menu__toggle-button").click(),$(".mobile-menu__sheild").addClass("invisible"),$(".mega-menu-mobile-menu__list").removeClass("mega-menu-nowonlevel2")}),$(".mobile-menu__toggle-button").on("click",function(){$(".mobile-menu__list-item").removeClass("active"),$(".mobile-menu__list-item").first().addClass("active"),$(".mobile-menu__sheild").removeClass("invisible"),$(".mega-menu-mobile-menu__list").addClass("mega-menu-nowonlevel1")}),$(".mobile-menu__list-item").on("click",function(){$(".mobile-menu__list-item").removeClass("active"),$(this).addClass("active")})}},{}],11:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=function(){function e(){var r=document.querySelector(".mobile__header--search"),e=r.querySelector(".search-form"),t=r.querySelector(".input-search"),n=r.querySelector(".icon"),a=r.querySelector(".mobile-search__close-icon"),o=(t.addEventListener("input",function(){t.value.length?a.style.display="inline-flex":a.style.display="none"}),a.addEventListener("click",function(){t.value="",a.style.display="none"}),t.addEventListener("input",function(){"inline-flex"==a.style.display?n.classList.add("active"):n.classList.remove("active")}),a.addEventListener("click",function(){"inline-flex"==a.style.display?n.classList.add("active"):n.classList.remove("active")}),n.addEventListener("click",function(){t.value.length&&e.submit()}),null),i=setInterval(function(){var e;(o=r.querySelector(".ss__autocomplete--target"))&&(e=function(e,t){e.addEventListener(t,function(){var n=setInterval(function(){var e,t;o.children.length?(clearInterval(n),o.style.backgroundColor="rgba(0, 0, 0, 0.7)",r.style.overflow="unset",document.body.style.overflowY="hidden",document.body.style.height="100vh",o.style.pointerEvents="all",o.style.borderTop="1px solid #e5e4e7",e=r.querySelector(".ss__autocomplete__facets"),(t=r.querySelector(".ss__autocomplete__content")).querySelector(".ss__autocomplete__content__results").insertAdjacentElement("afterend",e),e=r.querySelector(".ss__autocomplete"),t=t.clientHeight,e.style.minHeight="".concat(t+100,"px")):(o.style.backgroundColor="transparent",r.style.overflow="hidden",document.body.style.overflowY="scroll",document.body.style.height="auto",o.style.borderTop="none",o.style.pointerEvents="none")},300);setTimeout(function(){clearInterval(n)},3e3)})},clearInterval(i),e(t,"keydown"),e(t,"focus"),e(t,"focusout"),e(window,"mousemove"),e(window,"scroll"),e(window,"click"))},300);setTimeout(function(){clearInterval(i)},5e3)}window.innerWidth<=991&&e();window.addEventListener("resize",function(){window.innerWidth<=991&&e()})}},{}],12:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=function(){function t(){$(".algolia-autocomplete").css("display","none"),$(".search-popup__form input#q").blur();var e=$("#shopify-section-announcement-bar").length?$("#shopify-section-announcement-bar").offset().top-$(document).scrollTop():void 0;e&&e<=48||2<=$(document).scrollTop()?$("body").addClass("hide-mobile-search"):$("body").removeClass("hide-mobile-search")}$(document).on("scroll",function(e){t()}),$(window).width()<=991&&$(".mobile__header--search input#q").on("focus",function(e){$(document).off("scroll"),setTimeout(function(){$(document).on("scroll",function(e){t()})},500)});$("#mobile_header__search_icon").on("click",function(e){$("body").removeClass("hide-mobile-search")})}},{}],13:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}
1),n.default=function(){(function(){var e=$("body").find(".ais-SearchBox-input").val();$(".ais-keyword").text("'"+e+"'")})(),$(".ais-page").on("click",".ais-facets .ais-header",function(e){$(this).closest(".ais-facet-batch").toggleClass("closed")}),$(".ais-page").find(".ais-facet-clear").each(function(){$(this).on("click",function(e){$(this).removeClass("active");var t=$(this).data("facet-name"),t=$('[data-attribute="'+t+'"]');document.createEvent?(e=document.createEvent("Event")).initEvent("click",!0,!0):(e=document.createEventObject()).eventType="click",e.eventName="click",document.createEvent?$(".ais-page").find(t).each(function(){$(this)[0].dispatchEvent(e)}):$(".ais-page").find(t).each(function(){$(this)[0].fireEvent("on"+e.eventType,e)})})}),$(".ais-page").find(".ais-clear-btn.ais-filter-btn").on("click",function(e){$(this).removeClass("active");var t=$(".ais-current-refined-values--item a");document.createEvent?(e=document.createEvent("Event")).initEvent("click",!0,!0):(e=document.createEventObject()).eventType="click",e.eventName="click",document.createEvent?$(".ais-page").find(t).each(function(){$(this)[0].dispatchEvent(e)}):$(".ais-page").find(t).each(function(){$(this)[0].fireEvent("on"+e.eventType,e)}),setTimeout(function(){$(".ais-page").find(".ais-facets").removeClass("ais-facets__shown"),$("body").removeClass("ais-facets__shown"),$(".ais-facets-mobile-shadow").addClass("invisible")},2e3)}),setTimeout(function(){$(".ais-page").find(".ais-apply-btn").on("click",function(e){$(".ais-page").find(".ais-RangeInput-submit").trigger("click"),$(".ais-page").find(".ais-facets").removeClass("ais-facets__shown"),$("body").removeClass("ais-facets__shown"),$(".ais-facets-mobile-shadow").addClass("invisible")}),$(".ais-page").find(".ais-RangeInput-input").on("keyup change",function(e){789<$(window).width()&&$(".ais-page").find(".ais-RangeInput-submit").trigger("click")})},1e3),$(".search-page").on("click",".search__tab",function(e){$(".ais-stats-container").toggleClass("active"),$(".search__tab").removeClass("active"),$(this).addClass("active");var t=$(this).data("tab");$(".ais-block").removeClass("active"),$(".ais-block."+t).addClass("active"),$(".ais-progress").removeClass("active"),$(".ais-progress."+t).addClass("active"),$(".ais-view-all-wrapper").removeClass("active"),$(".ais-view-all-wrapper."+t).addClass("active"),"product"!=t?$(".ais-facets").hide():$(".ais-facets").show()}),$(".ais-page").on("click",".ais-sort",function(e){$(".ais-sort-wrapper").toggleClass("show-btn")}),window.onclick=function(e){e.target.matches(".ais-sort")||e.target.matches(".ais-caret-sort")||$(".ais-sort-wrapper").removeClass("show-btn")},$("html").on("click",".aa-mobile-footer",function(e){var t=$("html").find(".aa-footer-link").attr("href");window.location.href=t}),$(".search-form input").blur(function(){$(".search-form").removeClass("focus")}).focus(function(){$(".search-form").addClass("focus")}),$(".ais-close-icon").on("click",function(){$(".ais-facets").removeClass("ais-facets__shown"),$("body").removeClass("ais-facets__shown"),$(".ais-facets-mobile-shadow").addClass("invisible")})}},{}],14:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=function(){var e=document.querySelector(".bv-shogun-delivery-nav ul.grid-block"),t=document.querySelectorAll(".bv-shogun-accordion");e&&t.length&&!function(e,n){e.querySelectorAll("li").forEach(function(e,t){e.addEventListener("click",function(){n[t].scrollIntoView({behavior:"smooth",block:"center"}),0!=t&&"shipping"!=text&&text})})}(e,t);e=document.querySelector(".bv-shogun-terms-sale-nav ul.grid-block"),t=document.querySelectorAll(".bv-shogun-accordion");e&&t.length&&!function(e,r){e.querySelectorAll("li").forEach(function(e,t){e.addEventListener("click",function(){var n=e.querySelector(".text").textContent.trim().toLowerCase().replace(" ","-");r.forEach(function(e,t){e.classList.contains(n)&&e.scrollIntoView({behavior:"smooth",block:"center"})})})})}(e,t)}},{}]},{},[4]); 2//# sourceMappingURL=global.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.