// All rights reserved by Omnisend Ltd. Look, but don't touch. // https://www.omnisend.com/ // v4.0.1 if("undefined"==typeof window.OMNISEND_PUSH_NOTIFICATIONS_LOADED){window.OMNISEND_PUSH_NOTIFICATIONS_LOADED=!0;try{window._omnisend=function(e){"use strict";return e.config={snippetVersion:"4.0.1",snippetHost:"https://omnisnippet1.com/",appHost:"https://app.omnisend.com/",pickerAPIHost:"https://app.omnisend.com/",customEventsHost:"https://api.omnisend.com/",wtAPIHost:"https://wt.omnisendlink.com/",pnHost:"https://pn.soundestlink.com/",allowedOrigins:["https://app.omnisend.com"]},e}(window._omnisend||{}),function(){"use strict";if(null===document.getElementById("omnisend-dynamic-container")){var e=document.createElement("div");e.id="omnisend-dynamic-container",e.style.overflow="hidden",e.style.height="0px",document.body.appendChild(e)}}(),window.soundestInShop=window.soundestInShop||{},window.SOUNDEST=window.SOUNDEST||{},window.SOUNDEST.external=window.SOUNDEST.external||{},window.SOUNDEST_EVENTS=window.SOUNDEST_EVENTS||[],window.soundest=window.soundest||[],window._omnisend=window._omnisend||{},window.omnisend=window.omnisend||[],function(e,n,t){"use strict";var i;for(i in n)n.hasOwnProperty(i)&&(e[i]=n[i],t[i]=n[i]);for(i in e)e.hasOwnProperty(i)&&(n[i]=e[i],t[i]=e[i])}(window.soundestInShop,window.SOUNDEST,window._omnisend),window._omnisend=function(e){"use strict";e.utils={};var n=/^[0-9a-fA-F]{24}$/,t=/^[^\s@]+@[^\s@]+\.[^\s@]+$/;return e.utils.isDefined=function(e){return void 0!==e},e.utils.isObjectEmpty=function(e){for(var n in e)if(e.hasOwnProperty(n))return!1;return!0},e.utils.isNull=function(e){return null===e},e.utils.isArray=function(e){var n={};return"[object Array]"===n.toString.call(e)},e.utils.isInteger=function(e){var n={};return"[object Number]"===n.toString.call(e)&&Math.floor(e)===e},e.utils.isFloat=function(e){var n={};return"[object Number]"===n.toString.call(e)&&Math.floor(e)!==e},e.utils.isHTMLCollection=function(e){var n={};return"[object HTMLCollection]"===n.toString.call(e)},e.utils.isValidUrl=function(e){var n=/^(?:(?:(?:https?|ftp):)?\/\/)(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)(?:\.(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)*(?:\.(?:[a-z\u00a1-\uffff]{2,})))(?::\d{2,5})?(?:[/?#]\S*)?$/i;return n.test(e)},e.utils.isNodeList=function(e){var n={};return"[object NodeList]"===n.toString.call(e)},e.utils.isFunction=function(e){var n={};return"[object Function]"===n.toString.call(e)},e.utils.isString=function(e){var n={};return"[object String]"===n.toString.call(e)},e.utils.isObject=function(e){var n=typeof e;return"function"===n||"object"===n&&!!e},e.utils.inArray=function(e,n){return-1!==e.indexOf(n)},e.utils.forEach=function(n,t){var i,o;if(e.utils.isArray(n)||e.utils.isHTMLCollection(n)||e.utils.isNodeList(n))for(i=0;i-1||n.search("h")>-1){var i=e.getHours();n.search("hh")>-1&&(n=n.replace(/(^|[^\\])hh+/g,"$1"+t(i))),n.search("h")>-1&&(n=n.replace(/(^|[^\\])h/g,"$1"+i))}if(n.search("mm")>-1||n.search("m")>-1){var o=e.getMinutes();n.search("mm")>-1&&(n=n.replace(/(^|[^\\])mm+/g,"$1"+t(o))),n.search("m")>-1&&(n=n.replace(/(^|[^\\])m/g,"$1"+o))}if(n.search("ss")>-1||n.search("s")>-1){var s=e.getSeconds();n.search("ss")>-1&&(n=n.replace(/(^|[^\\])ss+/g,"$1"+t(s))),n.search("s")>-1&&(n=n.replace(/(^|[^\\])s/g,"$1"+s))}if(n.search("SSS")>-1){var r=e.getMilliseconds();n=n.replace(/(^|[^\\])SSS/g,"$1"+t(r,3))}return n},e.utils.base64UrlToUint8Array=function(e){for(var n="=".repeat((4-e.length%4)%4),t=(e+n).replace(/\-/g,"+").replace(/_/g,"/"),i=atob(t),o=new Uint8Array(i.length),s=0;st&&(clearInterval(s),i(!1)),e()&&(clearInterval(s),i(!0))},n)})},e}(window._omnisend),window._omnisend=function(e,n){"use strict";return e.params={},e.params.getJSON=function(e){var t,i={};if(n.isDefined(e)||(e=window.location.href),t=e.split("#"),n.isDefined(t[1]))try{i=n.jsonParse(decodeURIComponent(t[1]))}catch(o){}return i},e.params.getQuery=function(e){var t,i={};return n.isDefined(e)||(e=window.location.href),t=e.split("#"),n.isDefined(t[0])&&(t=t[0].split("?"),n.isDefined(t[1])?(t=t[1].split("&"),n.forEach(t,function(e){t=e.split("="),n.isDefined(t[0])&&n.isDefined(t[1])&&(i[t[0]]=decodeURIComponent(t[1]))})):(t=t[0].split("&"),n.forEach(t,function(e){t=e.split("="),n.isDefined(t[0])&&n.isDefined(t[1])&&(i[t[0]]=decodeURIComponent(t[1]))}))),i},e}(window._omnisend,window._omnisend.utils),window._omnisend=function(e,n){"use strict";function t(e,t,i){var o=this;return o.elements=[],n.isNull(e)?n.isNull(t)||n.isNull(i)?n.isNull(i)||n.forEach(document.querySelectorAll(i),function(e){o.elements.push(e)}):n.forEach(t.elements,function(e){n.forEach(e.querySelectorAll(i),function(e){o.elements.push(e)})}):o.elements.push(e),o}return t.prototype.first=function(){var e=this;return new t(e.elements[0],null,null)},t.prototype.clone=function(e){var n=this;return new t(n.elements[0].cloneNode(e),null,null)},t.prototype.parent=function(){var e=this;return new t(e.elements[0].parentNode,null,null)},t.prototype.val=function(e){var t=this,i=null;return n.isDefined(e)?n.isDefined(t.elements[0])&&(t.elements[0].value=e):n.isDefined(t.elements[0])&&(i=t.elements[0].value),i},t.prototype.find=function(e){var n=this;return new t(null,n,e)},t.prototype.html=function(e){var t=this;return n.forEach(t.elements,function(n){n.innerHTML=e}),t},t.prototype.size=function(){var e=this;return e.elements.length},t.prototype.attr=function(e,t){var i=this,o=null;return n.isDefined(t)?n.forEach(i.elements,function(n){n.setAttribute(e,t)}):n.isDefined(i.elements[0])&&(o=i.elements[0].getAttribute(e)),o},t.prototype.removeAttr=function(e){var t=this;return n.forEach(t.elements,function(n){n.removeAttribute(e)}),t},t.prototype.prop=function(e,t){var i=this,o=null;return n.isDefined(t)?n.forEach(i.elements,function(n){n[e]=t}):n.isDefined(i.elements[0])&&(o=i.elements[0][e]),o},t.prototype.empty=function(){var e=this;return n.forEach(e.elements,function(e){for(;e.firstChild;)e.removeChild(e.firstChild)}),e},t.prototype.submit=function(){var e=this;n.isDefined(e.elements[0])&&e.elements[0].submit()},t.prototype.reset=function(){var e=this;n.isDefined(e.elements[0])&&e.elements[0].reset()},t.prototype.height=function(){var e=this,t=0;return n.isDefined(e.elements[0])&&(t=e.elements[0].offsetHeight),t},t.prototype.width=function(){var e=this,t=0;return n.isDefined(e.elements[0])&&(t=e.elements[0].clientWidth),t},t.prototype.offsetWidth=function(){var e=this,t=0;return n.isDefined(e.elements[0])&&(t=e.elements[0].offsetWidth),t},t.prototype.prependTo=function(e){var i=this,o=[],s=[];return e instanceof t?o=e.elements:n.isString(e)&&(o=new t(null,null,e).elements),s=i.elements,n.forEach(s,function(e){n.forEach(o,function(n){n.insertBefore(e,n.firstChild)})}),i},t.prototype.appendTo=function(e){var i=this,o=[],s=[];return e instanceof t?o=e.elements:n.isString(e)&&(o=new t(null,null,e).elements),s=i.elements,n.forEach(s,function(e){n.forEach(o,function(n){n.appendChild(e)})}),i},t.prototype.appendAfter=function(e){var i=this,o=[],s=[];return e instanceof t?o=e.elements:n.isString(e)&&(o=new t(null,null,e).elements),s=i.elements,n.forEach(s,function(e){n.forEach(o,function(n){n.parentNode.insertBefore(e,n.nextSibling)})}),i},t.prototype.addClass=function(e){var t=this;return n.forEach(t.elements,function(t){n.isDefined(t.classList)?t.classList.add(e):t.className+=" "+e}),t},t.prototype.removeClass=function(e){var t=this;return n.forEach(t.elements,function(t){n.isDefined(t.classList)?t.classList.remove(e):t.className=t.className.replace(new RegExp("(^|\\b)"+e.split(" ").join("|")+"(\\b|$)","gi")," ")}),t},t.prototype.hasClass=function(e){var t=this,i=!1;return n.isDefined(t.elements[0])&&(i=n.isDefined(t.elements[0].classList)?t.elements[0].classList.contains(e):new RegExp("(^| )"+e+"( |$)","gi").test(t.elements[0].className)),i},t.prototype.closest=function(e){var i=this,o=new t(null,null,null);if(n.isDefined(i.elements[0])){for(var s=i.elements[0],r=new t(s,null,null);!r.hasClass(e)&&s;)s=s.parentNode,r=new t(s,null,null);r.hasClass(e)&&(o=r)}return o},t.prototype.visible=function(){var e=this,t=[];return n.isArray(e.elements)&&n.forEach(e.elements,function(e){e.offsetWidth&&e.offsetHeight&&e.getClientRects().length&&t.push(e)}),e.elements=t,e},t.prototype.css=function(e){var t=this;return n.forEach(t.elements,function(t){n.isString(e)?t.styleSheet?t.styleSheet.cssText=e:(t.innerHTML="",t.appendChild(document.createTextNode(e))):n.forEach(e,function(e,n){t.style[n]=e})}),t},t.prototype.setStyle=function(e,t,i){var o=this;return n.forEach(o.elements,function(n){n.style.setProperty(e,t,i)}),o},t.prototype.show=function(){var e=this;return n.forEach(e.elements,function(e){e.style.display="block"}),e},t.prototype.softShow=function(){var e=this;return n.forEach(e.elements,function(e){e.style.height="auto",e.style.opacity="1",e.style.position="initial",e.style.zIndex="initial"}),e},t.prototype.hide=function(){var e=this;return n.forEach(e.elements,function(e){e.style.display="none"}),e},t.prototype.softHide=function(){var e=this;return n.forEach(e.elements,function(e){e.style.height="0",e.style.opacity="0",e.style.position="absolute",e.style.zIndex="-1"}),e},t.prototype.each=function(e){var i=this;return n.forEach(i.elements,function(n,o){e(new t(n,null,null),o,i)}),i},t.prototype.on=function(e,t){var i=this;return n.forEach(i.elements,function(i){n.isDefined(i.addEventListener)?i.addEventListener(e,t,!1):i.attachEvent("on"+e,function(){t.call(i)})}),i},t.prototype.done=function(e){var t=this;return n.isFunction(e)&&n.forEach(t.elements,function(n){n.addEventListener?n.addEventListener("load",e):n.onreadystatechange=function(){n.elementreadyState in{loaded:1,complete:1}&&(n.onreadystatechange=null,e())}}),t},t.prototype.error=function(e){var t=this;return n.isFunction(e)&&n.forEach(t.elements,function(n){n.addEventListener&&n.addEventListener("error",e)}),t},n.isDefined(e.dom)||(e.dom={},e.dom.find=function(e){return new t(null,null,e)},e.dom.findElement=function(e){return new t(e,null,null)},e.dom.create=function(e,i){var o=document.createElement(e);return n.isDefined(i)&&n.forEach(i,function(e,n){o.setAttribute(n,e)}),new t(o,null,null)},e.dom.window=new t(window,null,null),e.dom.document=new t(document,null,null),e.dom.getOffsetX=function(){var e=n.isDefined(window.pageXOffset),t="CSS1Compat"===(document.compatMode||"");return e?window.pageXOffset:t?document.documentElement.scrollLeft:document.body.scrollLeft},e.dom.getOffsetY=function(){var e=n.isDefined(window.pageYOffset),t="CSS1Compat"===(document.compatMode||"");return e?window.pageYOffset:t?document.documentElement.scrollTop:document.body.scrollTop},e.dom.getWidth=function(){return window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth},e.dom.getHeight=function(){return window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight},e.dom.getScrollPercent=function(){var e=document.documentElement,n=document.body,t="scrollTop",i="scrollHeight",o=(e[t]||n[t])/((e[i]||n[i])-e.clientHeight)*100;return isNaN(o)&&(o=0),o},e.dom.onReady=function(e){"loading"!==document.readyState?e():document.addEventListener?document.addEventListener("DOMContentLoaded",e):document.attachEvent("onreadystatechange",function(){"loading"!==document.readyState&&e()})},e.dom.onLeave=function(n){e.dom.window.on("mouseout",function(e){var t=e?e:window.event,i=t.relatedTarget||t.toElement;i&&"HTML"!==i.nodeName||n()})},e.dom.onLeaveTop=function(n){e.dom.window.on("mouseout",function(e){var t=e?e:window.event;t.y<=0&&n()})},e.dom.injectScript=function(n,t,i){e.dom.create("script",{type:"text/javascript",async:!0,src:n}).error(i).done(t).appendTo("head")},e.dom.injectLink=function(n,t,i){e.dom.create("link",{rel:"stylesheet",type:"text/css",href:n}).error(i).done(t).appendTo("head")},e.dom.removeElement=function(e){var i=[];e instanceof t?i=e.elements:n.isString(e)&&(i=new t(null,null,e).elements),n.forEach(i,function(e){e.parentNode.removeChild(e)})}),e}(window._omnisend,window._omnisend.utils),window._omnisend=function(e,n){"use strict";if(!n.isDefined(e.getID)){var t=[],i=/-|:|T/gi,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";e.getID=function(e){var s,r="",c={excludeTime:!1,excludeHash:!1,hashLength:49,delimiter:"-",isReverse:!1};n.extend(c,e);do{if(r="",c.excludeTime===!1&&(r+=(new Date).toISOString().replace(i,"").slice(0,14)),c.excludeTime===!1&&c.excludeHash===!1&&(r+=c.delimiter),c.excludeHash===!1)for(s=1;s<=c.hashLength;s+=1)r+=o.charAt(Math.floor(Math.random()*o.length));if(c.isReverse===!0){if(r="",c.excludeHash===!1)for(s=1;s<=c.hashLength;s+=1)r+=o.charAt(Math.floor(Math.random()*o.length));c.excludeTime===!1&&c.excludeHash===!1&&(r+=c.delimiter),c.excludeTime===!1&&(r+=(new Date).toISOString().replace(i,"").slice(0,14))}}while(n.inArray(t,r));return t.push(r),r}}return e}(window._omnisend,window._omnisend.utils),window._omnisend=function(e,n){"use strict";if(!n.isDefined(e.cookies)){e.cookies={};var t=location.hostname.replace(/^www\./i,"");e.cookies.SECOND=1e3,e.cookies.MINUTE=6e4,e.cookies.HOUR=36e5,e.cookies.DAY=864e5,e.cookies.set=function(i,o,s){var r=i+"="+o+"; path=/; domain=."+t;if(/mybigcommerce.com/.test(location.hostname)&&n.isDefined(e.shopID)&&(r=i+"-"+e.shopID+"="+o+"; path=/; domain=.mybigcommerce.com"),n.isDefined(s)){var c=new Date,a=new Date;a.setTime(c.getTime()+s),r+="; expires="+a.toUTCString()}document.cookie=r},e.cookies.get=function(t){var i,o,s,r=document.cookie.split(";");for(/mybigcommerce.com/.test(location.hostname)&&n.isDefined(e.shopID)&&(t=t+"-"+e.shopID),s=0;s-1&&"granted"===s&&a(),i("pn_status",n)},f=function(){"permissions"in navigator&&navigator.permissions.query({name:"notifications"}).then(function(e){e.onchange=function(){e&&e.state&&l(e.state)}})};u().then(function(e){l(e),f()},function(){});var p=function(){if(!n.isObjectEmpty(e.pushNotifications)&&e.contactIdentified&&e.pushNotifications.enabled&&n.isFetchAPISupported()){var t=e.localStorage.load("pn_subscription"),i=e.localStorage.load("pn_status");t&&i&&"granted"===i&&fetch(e.config.pnHost+"REST/pushNotifications/v2/optIn",{method:"POST",body:e.utils.jsonStringify(r(t))})["catch"](function(e){console.log(e)})}};return p(),e.pushNotifications.contactIdentified=p,e}(window._omnisend,window._omnisend.utils)}catch(ignore){}}