PageSourceSearch

https://www.squimpishflies.com/cdn/shop/t/8/assets/booster.min.js?v=182014086683038334891678254527

js squimpishflies.com collected 2026-09-26 03:32:10 UTC 73,915 bytes, 2 lines download raw bytes

1function debounce(t,e,r){var a;return function(){var o=this,n=arguments,s=function(){a=null,r||t.apply(o,n)},i=r&&!a;clearTimeout(a),a=setTimeout(s,e),i&&t.apply(o,n)}}function getRandomInt(t,e){return Math.floor(Math.random()*(e-t+1)+t)}function closeModal(t,e=!1){e||(e=t.currentTarget.closest("[data-bstr-modal]")||t.currentTarget.closest(".modal")),e.style.display="none"}const isUndefined=t=>void 0===t;Element.prototype.closestEl=function(t){for(var e=this.parentElement;e;){if(e.matches(t))return e;var r=e.querySelectorAll(t);for(let a=0,o=r.length;a<o;++a)if(null!=r[a]&&r[a]!=this)return r[a];e=e.parentElement}return null};const BstrDummyClass=new Proxy(new class t{},{get:(t,e)=>()=>{}}),__bstrInitClass=(t,...e)=>{try{return new t(...e)}catch(r){console.debug("[Booster Class Init] ",r)}};class BstrStore{constructor(){}get(t,e=!1,r=!0){let a=localStorage.getItem(t);if(!a)return e;if(!r)return a;try{let o=JSON.parse(a);if(o.data,o.exp,"bstr"!==o.storeRef)return o;if(o.exp&&o.exp<Date.now())return localStorage.removeItem(t),e;return o.data}catch(n){return e}}set(t,e,r=!1){let a=!!r&&!isNaN(r)&&Date.now()+6e4*r;return localStorage.setItem(t,JSON.stringify({data:e,storeRef:"bstr",exp:a})),!0}}class BstrAsync{constructor({events:t}){this.events=t}async load({url:t,section:e=!1,selector:r="body",json:a=!1}){e&&t.searchParams.set("section_id",e);let o=await fetch(t.toString());if(!o.ok)return{};try{let n=await o.text(),s=new DOMParser().parseFromString(n,"text/html");if(!a)return{html:s.querySelector(r).innerHTML,parser:s};try{return{html:s.querySelector(r).innerHTML,parser:s,json:JSON.parse(s.querySelector(a).innerText)}}catch(i){return console.debug(i),{html:s.querySelector(r).innerHTML,parser:s,json:!1}}}catch(c){return console.debug(c),{}}}async getUpsell(t){let{html:e}=await this.load({url:new URL(window.location.origin+t),section:"api__upsell",selector:".shopify-section"});return e}}class BstrCart{constructor({events:t,basync:e}){this.events=t,this.basync=e,this.queue=[],this.awaitingSuccess=[],this.listeners=[],this.minicart={lastUpdate:0},this.cartSuccessConfig={action:_settings.cartAction},this.cartSuccessInfoTemplate=document.querySelector(".add-to-cart__success--single-current")&&document.querySelector(".add-to-cart__success--single-current").innerHTML||!1;let r=document.querySelectorAll("[data-cart-container]");for(let a=0,o=r.length;a<o;++a)this.addListener(r[a]);this.dispatchListeners(),this.bindXHRFetch()}bindXHRFetch(){var t,e;let r=this,a=window.XMLHttpRequest.prototype.open;window.XMLHttpRequest.prototype.open=function t(){return this.addEventListener("load",function(){try{let t=new URL(this._url);t.origin==window.location.origin&&["/cart/add.js","/cart/update.js","/cart/change.js","/cart/clear.js",].includes(t.pathname)&&r.dispatchListeners({change:!0})}catch(e){try{["/cart/add.js","/cart/update.js","/cart/change.js","/cart/clear.js",].includes(this._url)&&r.dispatchListeners({change:!0})}catch(a){console.log("[BOOSTER THEME] Invalid URL format caught in XHR.")}}}),a.apply(this,arguments)},t=window,"function"==typeof(e=window.fetch)&&(t.fetch=function(){let t=e.apply(this,arguments);return t.then(t=>{try{let e=new URL(t.url);e.origin==window.location.origin&&["/cart/add.js","/cart/update.js","/cart/change.js","/cart/clear.js",].includes(e.pathname)&&r.dispatchListeners({change:!0})}catch(a){console.log("[BOOSTER THEME] Invalid URL format caught in fetch.")}}),t}),window.addEventListener("storage",t=>{"bstr:cart:update"==t.key&&bstore.get("bstr:cart:update",0)>r.minicart.lastUpdate&&this.dispatchListeners()})}open(){if(document.querySelectorAll("[data-minicart-input]:checked").length)return;let t=document.querySelectorAll("[data-minicart-input]");for(let e of t){let r=e.closestEl(".minicart__label");if(r&&r.clientHeight>0&&r.clientWidth>0)return e.checked=!0}}close(){let t=document.querySelectorAll("[data-minicart-input]:checked");for(let e of t)e.checked=!1}async clear(){(await fetch("/cart/clear.js")).ok&&this.events.trigger("booster:cart:clear")}addListener(t,e){let r=t.dataset.cartSettings.split(","),a={};for(let o=0,n=r.length;o<n;++o){let s=r[o];a[s]=t.querySelector(`[data-${s}]`)}this.listeners.push({target:t,settings:a})}minicartHandler(t){for(let e=0,r=this.listeners.length;e<r;++e){let a=this.listeners[e],o=Object.keys(a.settings);for(let n=0,s=o.length;n<s;++n){let i=o[n];if(a.settings[i]&&!(a.settings[i].dataset.lastUpdate>t)&&("undefined"==typeof events||-1!=events.indexOf(i))){switch(i){case"count":a.settings[i].innerText=this.minicart.data.item_count;break;case"product-list":a.settings[i].innerHTML=this.minicart.data.html;break;case"total":a.settings[i].innerText=this.minicart.data.total}a.settings[i].dataset.lastUpdate=t}}}}async dispatchListeners({change:t=!1}={}){let e=Date.now();if(e>this.minicart.lastUpdate){let r=await (await fetch("/?section_id=api__minicart",{headers:{Pragma:"no-cache","Cache-Control":"no-cache, no-store, must-revalidate",Expires:0}})).text(),a=document.createElement("div");a.innerHTML=r,this.minicart={lastUpdate:e,data:JSON.parse(a.innerText)},this.minicart.data.items=JSON.parse(this.minicart.data.items),this.events.trigger("booster:cart:update",this.minicart,!0)}for(this.minicartHandler(e),t&&localStorage.setItem("bstr:cart:update",e),this.events.trigger("booster:content:update",{trigger:"minicart"});this.awaitingSuccess.length;)this.success(this.awaitingSuccess.pop())}quantityHandler(t,e,r=!0){t.preventDefault();let a=t.target.parentElement.querySelector("[data-qty-input]");if(e){if(!isNaN(parseInt(a.max))&&parseInt(a.value)>=a.max)return this.error({description:"Seems like there are no more items in stock."});a.value++}else{if(0>=parseInt(a.value)||!r&&1==parseInt(a.value))return!1;--a.value}return!r||a.onchange({target:a})}addToQueue(t){this.queue.push(t),this.queue.length>1||this.checkQueue()}addToCartIU(){let t=document.querySelectorAll("input.inline-upsell__toggle:checked"),e={
1items:[]};for(let r=0,a=t.length;r<a;++r){let o=document.getElementById(t[r].dataset.for).value;e.items.push({quantity:1,id:o})}this.addToCartJSON(!1,e)}addToCart(t=!1,e=!1){if(!t&&!e)return;let r=!1;t&&(r=t.currentTarget,t.preventDefault(),t.stopImmediatePropagation()),e||(e=r.closest("form")),r&&(r.disabled=!0,r.querySelector("[data-button-text]").innerText=_bstrLocale.buttons.adding);let{prevent:a}=this.events.trigger("booster:cart:b*add",{form:e,target:r});if(a){r&&(r.disabled=!1,r.querySelector("[data-button-text]").innerText=r.dataset.originalText);return}this.addToQueue({form:e,target:r})}addToCartJSON(t=!1,e={items:[]}){let r=!1;t&&(r=t.currentTarget),r&&(r.disabled=!0,r.querySelector("[data-button-text]").innerText=_bstrLocale.buttons.adding);let{prevent:a}=this.events.trigger("booster:cart:b*add",{json:e,target:r});if(a){r&&(r.disabled=!1,r.querySelector("[data-button-text]").innerText=r.dataset.originalText);return}this.addToQueue({target:r,json:e})}async removeFromCart(t=!1,e){let r=!!t&&t.closest(".minicart__entry");t&&(t.disabled=!0),r&&(r.style.opacity="0.5");let a=await (await fetch("/cart/change.js",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({quantity:0,id:e})})).json();return!!isUndefined(a.status)||"success"==a.status||(t&&(t.disabled=!1),r&&(r.style.opacity="1"),this.error(a))}async updateQuantity(t,e,r,a=!1){let{target:o}=t;a||(e=o.dataset.variantId,r=o.value);let n=await (await fetch("/cart/change.js",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({quantity:r,id:e})})).json();if(!isUndefined(n.status)&&"success"!=n.status)return this.error(n)}checkQueue(){this.queue.length&&this.processQueue(this.queue.shift())}async processQueue(t){let{target:e,form:r,json:a}=t,o=await (await fetch("/cart/add.js",r?{method:"POST",body:new URLSearchParams(new FormData(r)),headers:{"Content-Type":"multipart/form-data"}}:{method:"POST",body:JSON.stringify(a),headers:{"Content-Type":"application/json"}})).json();e&&(e.disabled=!1,e.querySelector("[data-button-text]").innerText=e.dataset.originalText),void 0!==o.status&&"success"!=o.status?this.error(o):this.awaitingSuccess.push(o),this.checkQueue()}async renderModal(t,e=!1){if(this.events.trigger("booster:cart:b*modal",{item:t,cart:this.minicart,will_upsell:e}).prevent)return;let r=document.getElementById("checkout--success"),a=r.closest(".modal"),o=t.image,n=t.product_title,s="",i=this.minicart.data.total,c=this.minicart.data.item_count;t.product_has_only_default_variant||(s=t.variant_title);let l=r.querySelector(".add-to-cart__success--single"),m=t=>l.querySelector(t),u=m(".add-to-cart__success--single-img");null!=o?(u.src=o,u.style.display="block"):u.style.display="none",m(".add-to-cart__success--single-title").innerText=n,m(".add-to-cart__success--single-variation").innerText=s;let d=this.cartSuccessInfoTemplate.replace("%total%",i).replace("%itemCount%",c+" item"+(c>1?"s":""));m(".add-to-cart__success--single-current").innerHTML=d;let h=this.events.trigger("booster:cart:b*upsell",{item:t,cart:this.minicart});if(e&&!h.prevent){let y=await this.basync.getUpsell(t.url),f=r.querySelector(".add-to-cart__success--upsell");if(f.style.display="none",""!=y.trim()){let p=document.getElementById("quickbuy__modal");p&&(p.style.display="none"),f.innerHTML=y,f.style.display="flex",this.events.trigger("booster:cart:upsell",{html:f,items:!1,item:t,cart:this.minicart})}}a.style.display="block",this.events.trigger("booster:content:update",{trigger:"upsell"})}success(t){let e=this.cartSuccessConfig,r=t.items&&t.items[0]||t;return(this.events.trigger("booster:cart:add",{item:r}),"cart"==e.action)?window.location="/cart":"checkout"==e.action?window.location="/checkout":"message"==e.action?this.events.trigger("booster:notify",{type:"success",message:"Product added to cart successfully."}):"minicart"==e.action?this.open():void this.renderModal(r,"upsell"==e.action)}error(t){return console.error("Error trying to add product:\n",t),this.events.trigger("booster:notify",{type:"error",message:t})}}class BstrCurrency{constructor({events:t}){this.moneyFormats={USD:{money_format:"${{amount}}",money_with_currency_format:"${{amount}} USD"},EUR:{money_format:"&euro;{{amount}}",money_with_currency_format:"&euro;{{amount}} EUR"},GBP:{money_format:"&pound;{{amount}}",money_with_currency_format:"&pound;{{amount}} GBP"},CAD:{money_format:"${{amount}}",money_with_currency_format:"${{amount}} CAD"},ALL:{money_format:"Lek {{amount}}",money_with_currency_format:"Lek {{amount}} ALL"},DZD:{money_format:"DA {{amount}}",money_with_currency_format:"DA {{amount}} DZD"},AFN:{money_format:"&#65;&#102; {{amount}}",money_with_currency_format:"&#65;&#102; {{amount}} AFN"},AOA:{money_format:"Kz{{amount}}",money_with_currency_format:"Kz{{amount}} AOA"},ARS:{money_format:"${{amount_with_comma_separator}}",money_with_currency_format:"${{amount_with_comma_separator}} ARS"},AMD:{money_format:"{{amount}} AMD",money_with_currency_format:"{{amount}} AMD"},AWG:{money_format:"Afl{{amount}}",money_with_currency_format:"Afl{{amount}} AWG"},AUD:{money_format:"${{amount}}",money_with_currency_format:"${{amount}} AUD"},BBD:{money_format:"${{amount}}",money_with_currency_format:"${{amount}} Bds"},AZN:{money_format:"m.{{amount}}",money_with_currency_format:"m.{{amount}} AZN"},BDT:{money_format:"Tk {{amount}}",money_with_currency_format:"Tk {{amount}} BDT"},BSD:{money_format:"BS${{amount}}",money_with_currency_format:"BS${{amount}} BSD"},BHD:{money_format:"{{amount}}0 BD",money_with_currency_format:"{{amount}}0 BHD"},BYN:{money_format:"Br {{amount}}",money_with_currency_format:"Br {{amount}} BYN"},BYR:{money_format:"Br {{amount}}",money_with_currency_format:"Br {{amount}} BYR"},BZD:{money_format:"BZ${{amount}}",money_with_currency_format:"BZ${{amount}} BZD"},BTN:{money_format:"Nu {{amount}}",money_with_currency_format:"Nu {{amount}} BTN"},BAM:{money_format:"KM {{amount_with_comma_separator}}",money_with_currency_format:"KM {{amount_with_comma_separator}} BAM"},BRL:{money_format:"R$ {{amount_with_comma_separator}}",money_with_currency_format:"R$ {{amount_with_comma_separator}} BRL"},BOB:{money_format:"Bs{{amount_with_comma_separator}}",money_with_currency_format:"Bs{{amount_with_comma_separator}} BOB"},BMD:{money_format:"&#36; {{amount}}",money_with_currency_format:"&#36; {{amount}} BMD"},BIF:{money_format:"&#70;&#66;&#117; {{amount}}",money_with_currency_format:"&#70;&#66;&#117; {{amount}} BIF"},BWP:{money_format:"P{{amount}}",money_with_currency_format:"P{{amount}} BWP"},BND:{money_format:"${{amount}}",money_with_currency_format:"${{amount}} BND"},CVE:{money_format:"&#36; {{amount}}",money_with_currency_format:"&#36; {{amount}} CVE"},KMF:{money_format:"&#67;&#70; {{amount}}",money_with_currency_format:"&#67;&#70; {{amount}} KMF"},CUC:{money_format:"{{amount}}",money_with_currency_format:"{{amount}} CUC"},CUP:{money_format:"{{amount}}",money_with_currency_format:"{{amount}} CUP"},CDF:{money_format:"&#70;&#67; {{amount}}",money_with_currency_format:"&#70;&#67; {{amount}} CDF"},DJF:{money_format:"&#70;&#100;&#106; {{amount}}",money_with_currency_format:"&#70;&#100;&#106; {{amount}} DJF"},ERN:{money_format:"{{amount}}",money_with_currency_format:"{{amount}} ERN"},FKP:{money_format:"&#163; {{amount}}",money_with_currency_format:"&#163; {{amount}} FKP"},GIP:{money_format:"&#163; {{amount}}",money_with_currency_format:"&#163; {{amount}} GIP"}
1,XAU:{money_format:"{{amount}}",money_with_currency_format:"{{amount}} XAU"},GGP:{money_format:"{{amount}}",money_with_currency_format:"{{amount}} GGP"},GNF:{money_format:"&#70;&#71; {{amount}}",money_with_currency_format:"&#70;&#71; {{amount}} GNF"},HTG:{money_format:"&#71; {{amount}}",money_with_currency_format:"&#71; {{amount}} HTG"},XDR:{money_format:"{{amount}}",money_with_currency_format:"{{amount}} XDR"},IDR:{money_format:"{{amount_with_comma_separator}} IDR",money_with_currency_format:"Rp {{amount_with_comma_separator}} IDR"},IQD:{money_format:"&#1593;.&#1583; {{amount}}",money_with_currency_format:"&#1593;.&#1583; {{amount}} IQD"},IMP:{money_format:"{{amount}}",money_with_currency_format:"{{amount}} IMP"},LAK:{money_format:"&#8365; {{amount}}",money_with_currency_format:"&#8365; {{amount}} LAK"},LSL:{money_format:"&#76; {{amount}}",money_with_currency_format:"&#76; {{amount}} LSL"},LRD:{money_format:"&#36; {{amount}}",money_with_currency_format:"&#36; {{amount}} LRD"},LYD:{money_format:"&#1604;.&#1583; {{amount}}",money_with_currency_format:"&#1604;.&#1583; {{amount}} LYD"},MWK:{money_format:"&#77;&#75; {{amount}}",money_with_currency_format:"&#77;&#75; {{amount}} MWK"},MRO:{money_format:"&#85;&#77; {{amount}}",money_with_currency_format:"&#85;&#77; {{amount}} MRO"},KPW:{money_format:"&#8361; {{amount}}",money_with_currency_format:"&#8361; {{amount}} KPW"},OMR:{money_format:"{{amount_with_comma_separator}} OMR",money_with_currency_format:"{{amount_with_comma_separator}} OMR"},PAB:{money_format:"&#66;&#47;&#46; {{amount}}",money_with_currency_format:"&#66;&#47;&#46; {{amount}} PAB"},SHP:{money_format:"&#163; {{amount}}",money_with_currency_format:"&#163; {{amount}} SHP"},SVC:{money_format:"&#36; {{amount}}",money_with_currency_format:"&#36; {{amount}} SVC"},SLL:{money_format:"&#76;&#101; {{amount}}",money_with_currency_format:"&#76;&#101; {{amount}} SLL"},XAG:{money_format:"{{amount}}",money_with_currency_format:"{{amount}} XAG"},SBD:{money_format:"&#36; {{amount}}",money_with_currency_format:"&#36; {{amount}} SBD"},SOS:{money_format:"&#83; {{amount}}",money_with_currency_format:"&#83; {{amount}} SOS"},SDG:{money_format:"&#163; {{amount}}",money_with_currency_format:"&#163; {{amount}} SDG"},SRD:{money_format:"&#36; {{amount}}",money_with_currency_format:"&#36; {{amount}} SRD"},SZL:{money_format:"&#76; {{amount}}",money_with_currency_format:"&#76; {{amount}} SZL"},TJS:{money_format:"&#84;&#74;&#83; {{amount}}",money_with_currency_format:"&#84;&#74;&#83; {{amount}} TJS"},TOP:{money_format:"&#84;&#36; {{amount}}",money_with_currency_format:"&#84;&#36; {{amount}} TOP"},TMT:{money_format:"&#109; {{amount}}",money_with_currency_format:"&#109; {{amount}} TMT"},UZS:{money_format:"&#1083;&#1074; {{amount}}",money_with_currency_format:"&#1083;&#1074; {{amount}} UZS"},YER:{money_format:"&#65020; {{amount}}",money_with_currency_format:"&#65020; {{amount}} YER"},BGN:{money_format:"{{amount}} Đ\xbbв",money_with_currency_format:"{{amount}} Đ\xbbв BGN"},MMK:{money_format:"K{{amount}}",money_with_currency_format:"K{{amount}} MMK"},KHR:{money_format:"KHR{{amount}}",money_with_currency_format:"KHR{{amount}}"},KYD:{money_format:"${{amount}}",money_with_currency_format:"${{amount}} KYD"},XAF:{money_format:"FCFA{{amount}}",money_with_currency_format:"FCFA{{amount}} XAF"},CLP:{money_format:"${{amount_no_decimals}}",money_with_currency_format:"${{amount_no_decimals}} CLP"},CNY:{money_format:"&#165;{{amount}}",money_with_currency_format:"&#165;{{amount}} CNY"},COP:{money_format:"${{amount_with_comma_separator}}",money_with_currency_format:"${{amount_with_comma_separator}} COP"},CRC:{money_format:"&#8353; {{amount_with_comma_separator}}",money_with_currency_format:"&#8353; {{amount_with_comma_separator}} CRC"},HRK:{money_format:"{{amount_with_comma_separator}} kn",money_with_currency_format:"{{amount_with_comma_separator}} kn HRK"},CZK:{money_format:"{{amount_with_comma_separator}} K&#269;",money_with_currency_format:"{{amount_with_comma_separator}} K&#269;"},DKK:{money_format:"{{amount_with_comma_separator}}",money_with_currency_format:"kr.{{amount_with_comma_separator}}"},DOP:{money_format:"RD$ {{amount}}",money_with_currency_format:"RD$ {{amount}}"},XCD:{money_format:"${{amount}}",money_with_currency_format:"EC${{amount}}"},EGP:{money_format:"LE {{amount}}",money_with_currency_format:"LE {{amount}} EGP"},ETB:{money_format:"Br{{amount}}",money_with_currency_format:"Br{{amount}} ETB"},XPF:{money_format:"{{amount_no_decimals_with_comma_separator}} XPF",money_with_currency_format:"{{amount_no_decimals_with_comma_separator}} XPF"},FJD:{money_format:"${{amount}}",money_with_currency_format:"FJ${{amount}}"},GMD:{money_format:"D {{amount}}",money_with_currency_format:"D {{amount}} GMD"},GHS:{money_format:"GH&#8373;{{amount}}",money_with_currency_format:"GH&#8373;{{amount}}"},GTQ:{money_format:"Q{{amount}}",money_with_currency_format:"{{amount}} GTQ"},GYD:{money_format:"G${{amount}}",money_with_currency_format:"${{amount}} GYD"},GEL:{money_format:"{{amount}} GEL",money_with_currency_format:"{{amount}} GEL"},HNL:{money_format:"L {{amount}}",money_with_currency_format:"L {{amount}} HNL"},HKD:{money_format:"${{amount}}",money_with_currency_format:"HK${{amount}}"},HUF:{money_format:"{{amount_no_decimals_with_comma_separator}}",money_with_currency_format:"{{amount_no_decimals_with_comma_separator}} Ft"},ISK:{money_format:"{{amount_no_decimals}} kr",money_with_currency_format:"{{amount_no_decimals}} kr ISK"},INR:{money_format:"Rs. {{amount}}",money_with_currency_format:"Rs. {{amount}}"},IDR:{money_format:"{{amount_with_comma_separator}}",money_with_currency_format:"Rp {{amount_with_comma_separator}}"},ILS:{money_format:"{{amount}} NIS",money_with_currency_format:"{{amount}} NIS"},JMD:{money_format:"${{amount}}",money_with_currency_format:"${{amount}} JMD"},JPY:{money_format:"&#165;{{amount_no_decimals}}",money_with_currency_format:"&#165;{{amount_no_decimals}} JPY"},JEP:{money_format:"&pound;{{amount}}",money_with_currency_format:"&pound;{{amount}} JEP"},JOD:{money_format:"{{amount}}0 JD",money_with_currency_format:"{{amount}}0 JOD"},KZT:{money_format:"{{amount}} KZT",money_with_currency_format:"{{amount}} KZT"},KES:{money_format:"KSh{{amount}}",money_with_currency_format:"KSh{{amount}}"},KWD:{money_format:"{{amount}}0 KD",money_with_currency_format:"{{amount}}0 KWD"},KGS:{money_format:"Đ\xbbв{{amount}}",money_with_currency_format:"Đ\xbbв{{amount}}"},LVL:{money_format:"Ls {{amount}}",money_with_currency_format:"Ls {{amount}} LVL"},LBP:{money_format:"L&pound;{{amount}}",money_with_currency_format:"L&pound;{{amount}} LBP"},LTL:{money_format:"{{amount}} Lt",money_with_currency_format:"{{amount}} Lt"},MGA:{money_format:"Ar {{amount}}",money_with_currency_format:"Ar {{amount}} MGA"},MKD:{money_format:"Đ\xb4Đ\xb5Đ˝ {{amount}}",money_with_currency_format:"Đ\xb4Đ\xb5Đ˝ {{amount}} MKD"},MOP:{money_format:"MOP${{amount}}",money_with_currency_format:"MOP${{amount}}"},MVR:{money_format:"Rf{{amount}}",money_with_currency_format:"Rf{{amount}} MRf"},MXN:{money_format:"$ {{amount}}",money_with_currency_format:"$ {{amount}} MXN"},MYR:{money_format:"RM{{amount}} MYR",money_with_currency_format:"RM{{amount}} MYR"},MUR:{money_format:"Rs {{amount}}",money_with_currency_format:"Rs {{amount}} MUR"},MDL:{money_format:"{{amount}} MDL",money_with_currency_format:"{{amount}} MDL"},MAD:{money_format:"{{amount}} dh",money_with_currency_format:"Dh {{amount}} MAD"},MNT:{money_format:"{{amount_no_decimals}} &#8366",money_with_currency_format:"{{amount_no_decimals}} MNT"},MZN:{money_format:"{{amount}} Mt",money_with_currency_format:"Mt {{amount}} MZN"},NAD:{money_format:"N${{amount}}",money_with_currency_format:"N${{amount}} NAD"},NPR:{money_format:"Rs{{amount}}",money_with_currency_format:"Rs{{amount}} NPR"},ANG:{money_format:"&fnof;{{amount}}",money_with_currency_format:"{{amount}} NA&fnof;"},NZD:{money_format:"${{amount}}",money_with_currency_format:"${{amount}} NZD"},NIO:{money_format:"C${{amount}}",money_with_currency_format:"C${{amount}} NIO"},NGN:{money_format:"&#8358;{{amount}}",money_with_currency_format:"&#8358;{{amount}} NGN"},NOK:{money_format:"kr {{amount_with_comma_separator}}",money_with_currency_format:"kr {{amount_with_comma_separator}} NOK"},OMR:{money_format:"{{amount_with_comma_separator}} OMR",money_with_currency_format:"{{amount_with_comma_separator}} OMR"},PKR:{money_format:"Rs.{{amount}}",money_with_currency_format:"Rs.{{amount}} PKR"},PGK:{money_format:"K {{amount}}",money_with_currency_format:"K {{amount}} PGK"},PYG:{money_format:"Gs. {{amount_no_decimals_with_comma_separator}}",money_with_currency_format:"Gs. {{amount_no_decimals_with_comma_separator}} PYG"},PEN:{money_format:"S/. {{amount}}",money_with_currency_format:"S/. {{amount}} PEN"},PHP:{money_format:"&#8369;{{amount}}",money_with_currency_format:"&#8369;{{amount}} PHP"},PLN:{money_format:"{{amount_with_comma_separator}} zl",money_with_currency_format:"{{amount_with_comma_separator}} zl PLN"},QAR:{money_format:"QAR {{amount_with_comma_separator}}",money_with_currency_format:"QAR {{amount_with_comma_separator}}"},RON:{money_format:"{{amount_with_comma_separator}} lei",money_with_currency_format:"{{amount_with_comma_separator}} lei RON"},RUB:{money_format:"&#1088;&#1091;&#1073;{{amount_with_comma_separator}}",money_with_currency_format:"&#1088;&#1091;&#1073;{{amount_with_comma_separator}} RUB"},RWF:{money_format:"{{amount_no_decimals}} RF",money_with_currency_format:"{{amount_no_decimals}} RWF"},WST:{money_format:"WS$ {{amount}}",money_with_currency_format:"WS$ {{amount}} WST"},SAR:{money_format:"{{amount}} SR",money_with_currency_format:"{{amount}} SAR"},STD:{money_format:"Db {{amount}}",money_with_currency_format:"Db {{amount}} STD"},RSD:{money_format:"{{amount}} RSD",money_with_currency_format:"{{amount}} RSD"},SCR:{money_format:"Rs {{amount}}",money_with_currency_format:"Rs {{amount}} SCR"},SGD:{money_format:"${{amount}}",money_with_currency_format:"${{amount}} SGD"},SYP:{money_format:"S&pound;{{amount}}",money_with_currency_format:"S&pound;{{amount}} SYP"},ZAR:{money_format:"R {{amount}}",money_with_currency_format:"R {{amount}} ZAR"},KRW:{money_format:"&#8361;{{amount_no_decimals}}",money_with_currency_format:"&#8361;{{amount_no_decimals}} KRW"},LKR:{money_format:"Rs {{amount}}",money_with_currency_format:"Rs {{amount}} LKR"},SEK:{money_format:"{{amount_no_decimals}} kr",money_with_currency_format:"{{amount_no_decimals}} kr SEK"},CHF:{money_format:"SFr. {{amount}}",money_with_currency_format:"SFr. {{amount}} CHF"},TWD:{money_format:"${{amount}}",money_with_currency_format:"${{amount}} TWD"},THB:{money_format:"{{amount}} &#xe3f;",money_with_currency_format:"{{amount}} &#xe3f; THB"},TZS:{money_format:"{{amount}} TZS",money_with_currency_format:"{{amount}} TZS"},TTD:{money_format:"${{amount}}",money_with_currency_format:"${{amount}} TTD"},TND:{money_format:"{{amount}}",money_with_currency_format:"{{amount}} DT"},TRY:{money_format:"{{amount}}TL",money_with_currency_format:"{{amount}}TL"},UGX:{money_format:"Ush {{amount_no_decimals}}",money_with_currency_format:"Ush {{amount_no_decimals}} UGX"},UAH:{money_format:"\xe2‚\xb4{{amount}}",money_with_currency_format:"\xe2‚\xb4{{amount}} UAH"},AED:{money_format:"Dhs. {{amount}}",money_with_currency_format:"Dhs. {{amount}} AED"},UYU:{money_format:"${{amount_with_comma_separator}}",money_with_currency_format:"${{amount_with_comma_separator}} UYU"},VUV:{money_format:"${{amount}}",money_with_currency_format:"${{amount}}VT"},VEF:{money_format:"Bs. {{amount_with_comma_separator}}",money_with_currency_format:"Bs. {{amount_with_comma_separator}} VEF"},VND:{money_format:"{{amount_no_decimals_with_comma_separator}}&#8363;",money_with_currency_format:"{{amount_no_decimals_with_comma_separator}} VND"},XBT:{money_format:"{{amount_no_decimals}} BTC",money_with_currency_format:"{{amount_no_decimals}} BTC"},XOF:{money_format:"CFA{{amount}}",money_with_currency_format:"CFA{{amount}} XOF"},ZMW:{money_format:"K{{amount_no_decimals_with_comma_separator}}",money_with_currency_format:"ZMW{{amount_no_decimals_with_comma_separator}}"}},this.currentCurrency=bstore.get("currentCurrency"),this.format=_settings.currencyFormat||"money_with_currency_format",this.events=t,this.currentCurrency&&Shopify.currency.active!==this.currentCurrency&&this.convertAll({}),this.events.on("booster:content:update",(t={})=>this.convertAll(t)),this.events.on("booster:price:update",this.priceUpdate.bind(this))}formatMoney(t,e){"string"==typeof t&&(t=t.replace(".",""));var r="",a=/\{\{\s*(\w+)\s*\}\}/,o=e||"${{amount}}";function n(t,e){return void 0===t?e:t}function s(t,e,r,a){if(e=n(e,2),r=n(r,","),a=n(a,"."),isNaN(t)||null==t)return 0;var o=(t=(t/100).toFixed(e)).split(".");return o[0].replace(/(\d)(?=(\d\d\d)+(?!\d))/g,"$1"+r)+(o[1]?a+o[1]:"")}switch(o.match(a)[1]){case"amount":r=s(t,2);break;case"amount_no_decimals":r=s(t,0);break;case"amount_with_comma_separator":r=s(t,2,".",",");break;case"amount_no_decimals_with_comma_separator":r=s(t,0,".",",")}return o.replace(a,r)}priceUpdate({elements:t}){let e=Shopify.currency.active,r=bstore.get("currentCurrency"),a=this.getFormat(r),o=this.getFormat(e);if(e!=r)for(let n of t)this.elemConvert({element:n,oldCurrency:e,newCurrency:r,oldFormat:o,newFormat:a})}elemConvert({element:t,oldCurrency:e=!1,newCurrency:r=!1,newFormat:a=!1,oldFormat:o=!1}){let n=t.innerText;if(!n||""==n.trim())return;let s=e||Shopify.currency.active;if(!s)return;let i=r||bstore.get("currentCurrency");if(!i)return;let c=a||this.getFormat(i),l;l=-1!==(o||this.getFormat(s)).indexOf("amount_no_decimals")?Currency.convert(100*parseInt(n.replace(/[^0-9]/g,""),10),s,i):"JOD"===s||"KWD"==s||"BHD"==s?Currency.convert(parseInt(n.replace(/[^0-9]/g,""),10)/10,s,i):Currency.convert(parseInt(n.replace(/[^0-9]/g,""),10),s,i),t.innerHTML=this.formatMoney(l,c),t.dataset.currency=i}convert({amount:t=!1,oldc:e=!1,newc:r=!1}){if(!t||!(e=e||Shopify.currency.active)||!(r=r||bstore.get("currentCurrency")))return t;let a=this.getFormat(r),o;return o=-1!==this.getFormat(e).indexOf("amount_no_decimals")?Currency.convert(100*parseInt(t.replace(/[^0-9]/g,""),10),e,r):"JOD"===e||"KWD"==e||"BHD"==e?Currency.convert(parseInt(t.replace(/[^0-9]/g,""),10)/10,e,r):Currency.convert(parseInt(t.replace(/[^0-9]/g,""),10),e,r),this.formatMoney(o,a)}convertAll({oldCurrency:t=!1,newCurrency:e=!1,selector:r=".jsPrice",format:a=this.format}){let o=t||Shopify.currency.active;if(!o)return;let n=e||bstore.get("currentCurrency");if(!n||n==o)return;let s=this.moneyFormats[o][a]||"{{amount}}",i=this.moneyFormats[n][a]||"{{amount}}",c=document.querySelectorAll(r);for(let l=0,m=c.length;l<m;++l){let u,d=c[l];if(d.dataset.currency==n)continue;let h=d.innerText;h&&""!=h.trim()&&(u=-1!==s.indexOf("amount_no_decimals")?Currency.convert(100*parseInt(h.replace(/[^0-9]/g,""),10),o,n):"JOD"===o||"KWD"==o||"BHD"==o?Currency.convert(parseInt(h.replace(/[^0-9]/g,""),10)/10,o,n):Currency.convert(parseInt(h.replace(/[^0-9]/g,""),10),o,n),d.innerHTML=this.formatMoney(u,i),d.dataset.currency=n)}bstore.set("currentCurrency",n),this.currentCurrency=n}getFormat(t=!1,e=!1){return e=e||_settings.currencyFormat||"money_with_currency_format",t=t||Shopify.currency.active,this.moneyFormats[t][e]}}class BstrFreeShipping{constructor({events:t,cfx:e}){this.events=t,this.cfx=e,this.goal=100*parseFloat(_settings.freeShippingAmount.trim()),this.current=0,this.format=this.cfx.getFormat(Shopify.currency.active),this.events.on("booster:cart:update",this.updateBars.bind(this)),this.events.on("booster:content:update",this.updateBars.bind(this))}updateBars(t={}){let e=t.data&&t.data.total_raw||this.current;this.current=e;let r=Math.min(e/this.goal*100,100),a=this.cfx.convert({amount:this.cfx.formatMoney(this.goal-e,this.format)}),o=document.querySelectorAll("[data-free-shipping-bar]"),n=document.querySelectorAll("[data-free-shipping-text]");for(let s of o)s.style.width=r+"%";for(let i of n)i.innerHTML=100==r?i.dataset.gotFreeShipping:i.dataset.freeShippingText.replace("%AMOUNT%",`<span class="jsPrice">${a}
1</span>`)}}class BstrLocalize{constructor({events:t,cfx:e}){this.events=t,this.cfx=e,_settings.geolocation&&this.events.on("booster:geo:visitor",this.localize.bind(this))}async localize(t){if(bstore.get("bstrLocalized"))return;bstore.set("bstrLocalized",!0,1440);let e=t.currency.code,r=t.language.code,a=window.location.pathname,o=!1;if(r!=Shopify.locale&&Object.keys(bstri18n.locales).includes(r)){let n=bstri18n.locales[r],s=bstri18n.locales[Shopify.locale];s.primary||(a=a.replace(`${s.url}`,"")),n.primary||(a=`${n.url}${a}`),o=!0}let i=bstri18n.currency_mode,c=bstri18n.currencies;if("none"!=i&&c.includes(e)){if("convert"==i&&bstore.get("currentCurrency")!=e)this.cfx.convertAll({oldCurrency:bstore.get("currentCurrency")||Shopify.currency.active,newCurrency:e}),this.events.trigger("booster:currency:changed");else if(Shopify.currency.active!=e){let l=new FormData;if(l.append("form_type","currency"),l.append("currency",e),await fetch("/cart/update",{body:l,method:"POST"}),!o)return window.location.reload()}}if(o)return window.location=a}}class BstrCntr{constructor(t="[data-bstr-cntr]"){this.id=t,this.counters=[],this.interval=!1,this.initCounters()}initCounters(){let t=document.querySelectorAll(`${this.id}:not([data-bstr-initd])`);if(!t.length)return;let e=1e3*parseInt(t[0].dataset.bstrCntrInterval);for(let r of(this.interval&&clearInterval(this.interval),t))this.counters.push(r),r.dataset.bstrInitd="true";this.interval=setInterval(this.countManagement.bind(this),e)}countManagement(){let t={};for(let e=0,r=this.counters.length;e<r;++e){let a=this.counters[e];if(t[a.dataset.bstrCntrId]){a.innerText=t[a.dataset.bstrCntrId];continue}let o=a.dataset.bstrCntrLimit,n=parseInt(a.innerText)||o,s=getRandomInt(Math.max(n-.1*n,1),Math.min(n+.1*n,o));a.innerText=s,t[a.dataset.bstrCntrId]=s}}}class BstrCopycat{constructor(){document.addEventListener("contextmenu",function(t){return t.preventDefault()}),this.preventInspectElement(),_settings.copycatText&&this.preventTextSelect()}preventTextSelect(){let t=document.createElement("style");t.innerText="*:not(textarea):not(input):not(select):not(form):not(datalist):not(fieldset):not(option) {-webkit-touch-callout: none !important;-webkit-user-select: none !important;-khtml-user-select: none !important;-moz-user-select: none !important;-ms-user-select: none !important;user-select: none !important;}",document.body.appendChild(t)}preventInspectElement(){document.onkeydown=function(t){if(!t.defaultPrevented&&("F12"==t.code||"F12"==t.key||t.ctrlKey&&t.shiftKey&&("j"==t.key||"J"==t.key||"KeyJ"==t.code)||t.ctrlKey&&t.shiftKey&&("c"==t.key||"C"==t.key||"KeyC"==t.code)||t.ctrlKey&&t.shiftKey&&("i"==t.key||"I"==t.key||"KeyI"==t.code)||t.ctrlKey&&("u"==t.key||"U"==t.key||"KeyU"==t.code)||_settings.copycatText&&(t.ctrlKey&&("c"==t.key||"C"==t.key||"KeyC"==t.code)||t.ctrlKey&&("a"==t.key||"A"==t.key||"KeyA"==t.code)||t.ctrlKey&&("x"==t.key||"X"==t.key||"KeyX"==t.code))))return!1}}}class BstrCountdown{constructor({events:t}){this.events=t,this.init(),this.events.on("booster:content:update",()=>this.init())}async init(t=document){let e=t.querySelectorAll("[data-countdown]");this.bstrCts?this.bstrCts.push(...e):this.bstrCts=[...e];let r=bstore.get("bstrCts");r||(r={});let a=new Date().getTime(),o=parseInt(_settings.countdownRandom);function n(t){switch(t){case"days":default:return 864e5;case"hours":return 36e5;case"minutes":return 6e4;case"seconds":return 1e3}}let s,i,c;if(_settings.countdownTime.includes("/"))i=(s=new Date(_settings.countdownTime).getTime())-864e5*o,c=s+864e5*o;else{let l=parseInt(_settings.countdownTime),m=n(_settings.countdownTimeFormat);i=a+Math.abs(l-o)*m,c=a+Math.abs(l+o)*m}function u(t,e,r=!0){if("app"==e){let o=getRandomInt(i,c);return t.dataset.expiryTime=o,o}{let s,l=t.dataset.duration;return s=l.includes("/")?new Date(l).getTime():a+parseInt(l)*n(t.dataset.durationFormat),r&&(t.dataset.expiryTime=s),s}}for(let d=0,h=e.length;d<h;++d){let y=e[d];y.removeAttribute("data-countdown");let f=y.dataset.ctKey,p=y.dataset.duration&&y.dataset.durationFormat?"block":"app";if(!r[f]||r[f]<a||Shopify.designMode){let g=u(y,p);r[f]=g}else if("app"==p){if(r[f]>c){let b=getRandomInt(i,c);r[f]=b,y.dataset.expiryTime=b}else y.dataset.expiryTime=r[f]}else{let w=u(y,p,!1);r[f]>w?(y.dataset.expiryTime=s,r[f]=w):y.dataset.expiryTime=r[f]}}bstore.set("bstrCts",r,1440),this.countdownStarted||(setInterval(this.tickCountdowns.bind(this),1e3),this.countdownStarted=!0)}tickCountdowns(){for(let t=0,e=this.bstrCts.length;t<e;++t)this.tickCountdown(this.bstrCts[t])}tickCountdown(t){if("true"==t.dataset.countdownTimedOut)return;let e=(parseInt(t.dataset.expiryTime)-Date.now())/1e3,r=t.querySelector(".days"),a=t.querySelector(".hours"),o=t.querySelector(".minutes"),n=t.querySelector(".seconds");if(e<=0){if("cart-ct-timer"==t.dataset.ctKey){t.dataset.expiryTime=Date.now()+3e5;return}t.dataset.countdownTimedOut="true",r&&(r.innerText="00"),a&&(a.innerText="00"),o&&(o.innerText="00"),n&&(n.innerText="00");return}let s=Math.floor(e/86400);r&&(r.innerText=s>=10&&s||"0"+s);let i=Math.floor((e-=86400*s)/3600)%24;e-=3600*i,a&&(a.innerText=i>=10&&i||"0"+i);let c=Math.floor(e/60)%60;e-=60*c,o&&(o.innerText=c>=10&&c||"0"+c);let l=e%60;n&&(n.innerText=l>=10&&Math.floor(l)||"0"+Math.floor(l))}}class BstrDynTitle{constructor(){this.originalTitle=document.title;let t=parseInt(_settings.dynTitleIntr);this.intr=isNaN(t)?2500:1e3*t,this.initLeavePage(),this.initOnPage()}initLeavePage(){let t=_settings.BPDynTitle.trim().split("\n");this.LPTitles=[this.originalTitle,...t],window.addEventListener("blur",()=>{clearInterval(this.OPRotation),this.OPRotation=!1,document.title=this.originalTitle,""!=t[0]&&(this.LPRotation||(this.LPRotation=setInterval(()=>this.rotateTitles(this.LPTitles),this.intr)))})}initOnPage(){let t=_settings.OPDynTitle.trim().split("\n");this.OPTitles=[this.originalTitle,...t],window.addEventListener("focus",()=>{clearInterval(this.LPRotation),this.LPRotation=!1,document.title=this.originalTitle,""!=t[0]&&(this.OPRotation||(this.OPRotation=setInterval(()=>this.rotateTitles(this.OPTitles),this.intr)))}),this.LPRotation||""==t[0]||(this.OPRotation=setInterval(()=>this.rotateTitles(this.OPTitles),this.intr))}rotateTitles(t){let e=t.length,r=t.indexOf(document.title);++r>=e&&(r=0),document.title=t[r]}}class BstrElements{constructor({events:t,basync:e,cfx:r,cart:a}){this.events=t,this.cfx=r,this.cart=a,this.basync=e,this.stock=new BstrStock({events:t}),this.marqueeIntervals={},this.cardTemplate=document.getElementById("productCardTemplate"),this.checkPagination(),this.initMarquees(),this.initElements(),this.events.on("booster:content:update",this.initElements.bind(this)),this.events.on("booster:currency:changed",()=>this.cfxInput())}initElements(){this.quantityHandlers(),this.cfxInput(),this.initSearch(),this.boosterRevert(),this.localizeDates()}async initMarquees(){let t=document.querySelectorAll('[data-blocktype="barTextMarquee"]');for(let e=0,r=t.length;e<r;e++){let a=t[e],o=a.dataset.blockid;this.marqueeIntervals[o]=setInterval(this.scrollMarquee,2e3,a)}}scrollMarquee(t){if(t.dataset.currentmessage>=t.dataset.messagescount){t.dataset.currentmessage=0,t.style.transform="translateY(0%)";return}t.dataset.currentmessage++,t.style.transform=`translateY(-${100*t.dataset.currentmessage}%)`}checkPagination(){if("infinite"==_settings.pagination){let t=document.querySelector(".row--product.product__list");t&&(self=this,window.addEventListener("scroll",debounce(()=>{if(window.innerHeight+window.scrollY>=t.offsetHeight){let e=document.querySelector(".pagination--hidden");e&&self.renderChangePage(!1,e,!1)}},250)))}}boosterRevert(){let t=document.querySelectorAll(".booster--revert div:not(.booster--revert)");for(let e=0,r=t.length;e<r;++e)t[e].classList.add("booster--revert")}initSearch(){let t=document.querySelectorAll("input[data-search]:not([data-bstr-initd])");for(let e=0,r=t.length;e<r;++e)t[e].dataset.bstrInitd="true",t[e].oninput=debounce(this.searchSuggest.bind(this),230,!1)}cfxInput(){if("convert"==bstri18n.currency_mode){let t=bstore.get("currentCurrency");
1t&&t!=Shopify.currency.active&&document.querySelectorAll("[data-currency-selector]").forEach(e=>{e.value=t})}}quantityHandlers(){let t=document.querySelectorAll("[data-qty-int-input]:not([data-bstr-initd])");for(let e of t)e.dataset.bstrInitd="true",e.oninput=debounce(t=>{e.onchange(t)},500,!1)}convertCurrencyChange(t){let e=t.value;e!=bstore.get("currentCurrency")&&this.cfx.convertAll({oldCurrency:bstore.get("currentCurrency")||Shopify.currency.active,newCurrency:e})}submitCurrencyChange(t){return t.closest("form").submit()}languageChange(t){return window.location=t.value}stickyBuy(t,e){if(t.dataset.productId){let r=t.closestEl(".sticky--mobile");if(r.classList.contains("sticky--closed"))return r.classList.remove("sticky--closed")}else{let a=t.dataset.buyButton,o=document.getElementById("product_form_"+a);o&&this.cart.addToCart(e,o)}}closeSticky(t){t.closest(".sticky--mobile").classList.add("sticky--closed")}async renderSort(t){let e=new URL(document.URL);e.searchParams.set("sort_by",t.value),e.searchParams.delete("page");let r=e.href,a=document.querySelector(".shopify-section.row--product.product__list");a.style.opacity="0.5";let{html:o}=await this.basync.load({url:e,section:"product-list",selector:"#shopify-section-product-list"});if(!o)return a.style.opacity="1";a.innerHTML=o,history.replaceState({},"",r),this.events.trigger("booster:content:update",{trigger:"sort"}),a.style.opacity="1"}submitSearch(t){t.closestEl("form").submit()}openSearch(t){t?(t.closestEl("[data-search-container]").classList.add("focused"),"input"!=t.tagName&&(t=t.closestEl("input"))):((t=document.querySelector(".search__container--abs")).classList.add("focused"),t=t.querySelector("input")),t.focus();let e=t.closestEl("[data-search-suggest]");t.value.length||boosterTheme.handleEmptySearch(e)}closeSearch(t){t.closestEl("[data-search-container]").classList.remove("focused")}renderProductCard(t){let e=this.cardTemplate.cloneNode(!0).content.children[0],r=t=>e.querySelector(t);r(".card__img--container").href=t.url,r(".card__title").href=t.url,r("[data-product-image]").src=t.featured_image.url,r(".card__title").innerText=t.title,r(".card__price").innerText=t.price;let a=r("[data-countdown]");return a.classList.add("hide"),a.removeAttribute("data-countdown"),t.available||e.classList.add("card--soldout"),e.classList.add("col-md-1-5"),e}createSearchSuggestResult(t){return this.renderProductCard(t)}populateSearchSuggest(t,e){for(var r=e.resources.results.products,a=document.createDocumentFragment(),o=0,n=r.length;o<n;++o)a.appendChild(this.createSearchSuggestResult(r[o]));return t.innerHTML="",t.appendChild(a),this.events.trigger("booster:content:update")}searchSuggest(t){var e=this;let r=t.target.value,a=t.target.closest("[data-search-container]").querySelector("[data-search-suggest]");if(!(r.length>0))return this.handleEmptySearch(a);fetch(`/search/suggest.json?q=${r}&resources[type]=product&resources[limit]=5&resources[options][unavailable_products]=last`).then(t=>t.json()).then(t=>e.populateSearchSuggest(a,t))}handleEmptySearch(t){return t.innerHTML=emptySearch,this.events.trigger("booster:content:update")}async quickBuy(t){if(window.innerWidth<768)return;t.preventDefault();let e='<button class="close" onclick="closeModal(event)"><i class="uil uil-arrow-left"></i>'+_bstrLocale.buttons.back_to_shop+"</button>",r=(t,e)=>t.querySelector(e),{parser:a}=await this.basync.load({url:new URL(t.target.closest("a").href),section:"product-page__product"});if(r(a,".product__row").classList.contains("product__row--marketplace")){let o=r
1(a,".product__row");o.classList.remove("product__row--marketplace");let n=r(o,".product__page--info"),s=r(n,".product__title"),i=r(n,".product__price--holder");o.removeChild(n);let c=r(o,".product__page--info");r(c,".product__title")||c.insertBefore(s,c.firstChild),r(c,".product__price")||r(c,".product__title").insertAdjacentElement("afterend",i)}let l=document.getElementById("quickbuy__modal");r(l,".content").innerHTML=e+r(a,"body").innerHTML,l.style.display="flex",this.events.trigger("booster:content:update",{trigger:"quickbuy"})}toggleTab(t,e){let r=t.closest(".tab__container");r.querySelector(".tab--show").classList.remove("tab--show"),r.querySelector(`#${e}`).classList.add("tab--show");r.querySelector(".tab__holder").querySelector(".tab--active").classList.remove("tab--active"),t.classList.add("tab--active")}toggleCollectionView(t,e){if(e.classList.contains("view--active"))return;e.closestEl(".view--active").classList.remove("view--active"),e.classList.add("view--active");let r=document.querySelectorAll(".row--product");if("card"==t)for(var a=0,o=r.length;a<o;++a)r[a].classList.remove("card--expanded");else for(var a=0,o=r.length;a<o;++a)r[a].classList.add("card--expanded")}async renderChangePage(t=!1,e,r=!1){t&&t.preventDefault();let a=document.querySelector(".product__list.row--product");a.style.opacity="0.4",e.disabled=!0;let o=new URL(e.href),{html:n}=await this.basync.load({url:o,section:"product-list",selector:".product__list.row--product"});if(!n)return a.style.opacity="1",e.disabled=!1;r?(a.innerHTML=n,a.scrollIntoView({block:"start",behavior:"smooth"})):(e.closest(".pagination").remove(),a.innerHTML+=n);let s=new URL(document.URL);return s.searchParams.set("page",o.searchParams.get("page")),history.pushState({},"",s),a.style.opacity="1",this.events.trigger("booster:content:update",{trigger:"pagination"})}localizeDates(){let t=document.querySelectorAll("[data-bstr-delivery-date]:not([data-bstr-initd])");for(let e of t){e.dataset.bstrInitd="true";let r=parseInt(e.innerText.replace(/[^\d]/g,""));if(isNaN(r))continue;let a=new Date;a.setDate(a.getDate()+r),e.innerText=a.toGMTString().split(a.getFullYear())[0].trim()}}}class BstrFilters{constructor({events:t,basync:e}){this.basync=e,this.events=t,this.initListeners(),this.events.on("booster:content:update",()=>this.initListeners())}initListeners(){for(let t of document.querySelectorAll("input[data-filter-href]:not([data-bstr-initd])"))t.dataset.bstrInitd="true",t.addEventListener("change",this.modifyFilters.bind(this));for(let e of document.querySelectorAll("[data-filter-href]:not([data-bstr-initd]):not(input)"))e.dataset.bstrInitd="true",e.addEventListener("click",this.modifyFilters.bind(this))}modifyFilters(t){this.renderChangePage(t.target.dataset.filterHref)}setInputState(t){for(let e of document.querySelectorAll("[data-filter-href]"))e.disabled=!t}async renderChangePage(t){let e=document.querySelector(".shopify-section.row--product.product__list");e.style.opacity="0.4",this.setInputState(!1);let{html:r,json:a}=await this.basync.load({url:new URL(window.location.origin+t),section:"product-list",selector:"#shopify-section-product-list",json:"noscript"});if(!r){this.setInputState(!0),e.style.opacity="1";return}for(let o of(e.innerHTML=r,history.pushState({},"",window.location.origin+t),this.events.trigger("booster:content:update"),e.style.opacity="1",this.renderFilters(a),document.querySelectorAll(".collection__total-items")))o.innerText=a.count}renderFilters(t){for(let[e,r]of(this.setInputState(!0),Object.entries(t.filters)))for(let a of r){let o=document.querySelector(`[data-filter="${e}-${a.value}"]`),n=o.nextElementSibling.querySelector("[data-filter-count]");n&&(n.innerText=a.count),o.disabled=!a.count,o.checked=a.active,o.dataset.filterHref=a.active?a.urls.remove:a.urls.add,a.count?o.closest("div").classList.remove("filter--disabled"):o.closest("div").classList.add("filter--disabled")}}}class BstrGDPR{constructor(t="bstr--notice"){if(this.container=document.getElementById(t),!this.container)return;this.closeButton=this.container.querySelector("[data-gdpr-accept]"),this.closeButton&&this.closeButton.addEventListener("click",this.close.bind(this)),this.open(!0)}open(t=!1){return this.container?t&&bstore.get("bstr_gdpr")?void 0:this.container.style.display="block":console.info("[OPEN] GDPR container not found.")}close(){return this.container?(bstore.set("bstr_gdpr","true",43200),this.container.style.display="none"):console.info("[CLOSE] GDPR container not found.")}}class BstrEvents{constructor(){this.listeners={},this.logs={}}on(t,e){if("function"!=typeof e)throw"[BOOSTER EVENT] Callback must be a function. Event: "+t;this.logs[t]&&e.call(e,this.logs[t]),void 0===this.listeners[t]?this.listeners[t]=[e]:this.listeners[t].push(e)}trigger(t,e={},r=!1){let a=this.listeners[t],o=document.dispatchEvent(new CustomEvent(t,{detail:e,cancelable:t.includes(":b*"),bubbles:!0})),n=[o];if(a&&a.length){let s=!o;for(let i of a)try{let c=i.call(i,{...e,prevented:s});void 0!==c&&(n.push(c),!0!==s&&(s=!1===c))}catch(l){console.info(`[BOOSTER EVENTS] Error caught on ${t}.
2${l}`);continue}}return r&&(this.logs[t]=e),{values:n,prevent:n.includes(!1)}}}class BstrIU{constructor({cfx:t,events:e,swatches:r}){this.cfx=t,this.swatches=r,this.events=e,this.events.on("booster:variant:select",this.syncInputs.bind(this))}syncInputs(t){if(!t.selectedVariant.available)return;let e=t.product.id,r=t.selectedVariant.id;document.querySelectorAll(`[data-upsell-id="${e}"]`).forEach(t=>{"SELECT"==t.tagName&&t.value!=r&&(t.value=r)}
2),this.toggleVariantIU()}toggleVariantIU(t=!1){let e=document.getElementById("inline-upsell__total");if(!e)return;let r=document.getElementById("inline-upsell__discount");if(t&&"SELECT"==t.tagName){let a=t.dataset.upsellId,o=t.value;this.swatches.setProductVariant(a,o)}let n=document.querySelectorAll("input.inline-upsell__toggle:checked"),s=0,i=0,c=[],l=this.cfx.getFormat(Shopify.currency.active);for(let m=0,u=n.length;m<u;++m){let d=document.getElementById(n[m].dataset.for),h="INPUT"==d.tagName?parseInt(d.dataset.price):parseInt(d.options[d.selectedIndex].dataset.price),y="INPUT"==d.tagName?parseInt(d.dataset.comparePrice):parseInt(d.options[d.selectedIndex].dataset.comparePrice),f=d.closestEl(".card--default"),p=f.querySelector("[data-iu-price]"),g=f.querySelector("[data-iu-price-sale]");p.innerHTML=this.cfx.formatMoney(h,l),c.push(p),y>h?(g.parentElement.classList.add("card__price--sale"),g.innerHTML=this.cfx.formatMoney(y,l),c.push(g)):(g.parentElement.classList.remove("card__price--sale"),g.innerHTML=""),s+=h,i+=y}e.innerHTML=this.cfx.formatMoney(s,l),r.innerHTML=i>s?this.cfx.formatMoney(i,l):"",c.push(e,r),this.events.trigger("booster:price:update",{currency:Shopify.currency.active,elements:c})}}class BstrLazy{constructor({events:t,cname:e="lazyload"}){this.events=t,this.class=e,this.images=!0,"loading"in HTMLImageElement.prototype&&_settings.nativeLazyLoad&&(this.images=!1),this.init()}init(){this.images||this.convertNative(),this.observer=new IntersectionObserver(function(t,e){for(let r=0,a=t.length;r<a;++r){let o=t[r];if(o.isIntersecting){let n=o.target;switch(n.classList.remove("lazyload"),n.classList.add("lazyloaded"),n.tagName){case"IMG":n.dataset.sizes&&(n.sizes=n.dataset.sizes),n.dataset.src&&(n.src=n.dataset.src),n.dataset.srcset&&(n.srcset=n.dataset.srcset);break;case"DIV":if(n.dataset.bgset){let s=window.innerWidth,i=n.dataset.bgset.split(",");for(let c=0,l=i.length;c<l;++c){let m=i[c].split(" ");if(parseInt(m[1])>=s||c+1==i.length){n.style.backgroundImage=`url(${m})`;break}}break}n.src=n.dataset.src;break;case"VIDEO":let u=n.querySelector("source");u.src=u.dataset.src;break;default:n.src=n.dataset.src}e.unobserve(o.target)}}},{threshold:.05});let t=this.images?document.querySelectorAll(".lazyload"):document.querySelectorAll('.lazyload:not([loading="lazy"])');for(let e=0,r=t.length;e<r;++e)this.observer.observe(t[e]);this.events.on("booster:content:update",()=>this.update())}convertNative(){var t=document.querySelectorAll('img[loading="lazy"]:not([data-bstr-initd])');for(let e=0,r=t.length;e<r;++e){let a=t[e];a.dataset.sizes&&(a.sizes=a.dataset.sizes),a.dataset.src&&(a.src=a.dataset.src),a.dataset.srcset&&(a.srcset=a.dataset.srcset),a.dataset.bstrInitd="true"}}update(){this.images||this.convertNative();let t=this.images?document.querySelectorAll(".lazyload"):document.querySelectorAll('.lazyload:not([loading="lazy"])');for(let e=0,r=t.length;e<r;++e)this.observer.observe(t[e])}}class BstrNotify{constructor({events:t}){this.events=t,this.popupHolder=document.getElementById("booster__popup--holder"),this.events.on("booster:notify",this.fn.bind(this))}fn(t){var e,r=this;t.url?((e=document.createElement("a")).href=t.url,e.target="_blank"):e=document.createElement("div"),t.id&&(e.dataset.id=t.id);let a=function(){if(this.dataset.id){let t=bstore.get("bstr_notifs")||{},e=t.dismissed||[];e.push(this.dataset.id),t.dismissed=e,bstore.set("bstr_notifs",t,120)}this.parentElement.removeChild(this)};e.setAttribute("class","booster__popup booster__popup--"+t.type),e.innerText="string"==typeof t.message?t.message:JSON.stringify(t.message),r.popupHolder.appendChild(e),e.onclick=a,e.classList.add("anim__fade-in"),!1!==t.expires&&setTimeout(function(){try{r.popupHolder.removeChild(e)}catch(t){}},t.expires||5e3)}}class BstrRecentlyBought{constructor(){if("undefined"==typeof recentlyBoughtConfig)return;this.config=recentlyBoughtConfig,this.container=document.getElementById("recently-bought--holder"),this.init()}
2async init(){let t=await (await fetch(this.config.allProductsUrl+"?section_id=api__recently-bought")).text(),e=document.createElement("div");e.innerHTML=t;let r=JSON.parse(e.querySelector(".shopify-section").innerText);r.names=r.names.split(","),r.names=r.names.filter(t=>""!=t.trim()),r.names.length||(r.names="Alissa Ashford, Carroll Calley, Augustina Angulo, Kenna Kuntz, Hailey Hinkle, Breann Beckham, Raquel Roles, Bernetta Beeks".split(",")),this.recentlyBoughtCollection=r,setInterval(()=>this.render(),(_settings.recentlyBoughtInterval+_settings.recentlyBoughtRemain)*1e3)}render(){let t=this.container,e=e=>t.querySelector(e),r=e(".recently-bought--img img"),a=e(".recently-bought--who"),o=e(".recently-bought--when"),n=e(".recently-bought--what"),s=e(".recently-bought--price"),i=this.recentlyBoughtCollection.names,c=this.recentlyBoughtCollection.collection,l=c[getRandomInt(0,c.length-1)],m;if(this.config.useNames){if(m=i[getRandomInt(0,i.length-1)].trim(),"shorten"==this.config.nameFormat){let u=m.split(" ");m=1==u.length?u[0]:`${u[0]} ${u[1][0]}.`}else"initials"==this.config.nameFormat&&(m=m.split(" ").reduce((t,e)=>t+=`${e[0]}. `,""))}else m=_bstrLocale.recentlyBought.someone;r.src=l.image,n.innerText=l.title.slice(0,24),s.querySelector(".current-price").innerText=l.priceFormat,s.querySelector(".old-price").innerText=l.sale?l.discountPriceFormat:"",a.innerText=_bstrLocale.recentlyBought.purchased.replace("%name%",m),o.innerText=_bstrLocale.recentlyBought.ago.replace("%time%",getRandomInt(2,50)),t.href=l.url;let d=e(".recently-bought--img-ratio");d.dataset.widthAdjusted||(d.style.width=t.clientHeight+"px",d.dataset.widthAdjusted="true"),t.classList.add("anim__fade-in"),setTimeout(()=>{t.classList.remove("anim__fade-in")},1e3*_settings.recentlyBoughtRemain)}}class BstrSlider{constructor({events:t,selector:e,breakpoints:r}={}){this._selector=e||"[data-bstr-slider]",this._idSelector=this._selector.replace(/(\[data-|\])/g,"").replace(/-(\w)/g,t=>t[1].toUpperCase()),this._breakpoints=r||{sm:768,md:1024},this._sliders={},this._currentIndex=0,this._resize=!1,this.init(),t.on("booster:content:update",()=>this.init())}_isVisible(t,e,r){return r?e.top-t.top<=0&&e.bottom-t.bottom>=0:e.left-t.left<=0&&e.right-t.right>=0}async _parentMoveCallback(t){let e=parseInt(t.dataset.bstrSliderCurrent),r="vertical"==t.dataset.bstrSliderOrientation.toLowerCase();if(!t.querySelector("[data-bstr-slide]"))return;let a=r?Math.round(t.scrollTop/t.querySelector("[data-bstr-slide]").offsetHeight):Math.round(t.scrollLeft/t.querySelector("[data-bstr-slide]").offsetWidth);t.dataset.bstrSliderCurrent=a;let o=t.querySelectorAll("[data-bstr-slide]"),n=[],s=[],i=t.closest("[data-bstr-slide-holder]").getBoundingClientRect();for(let c=0;c<o.length;++c){let l=o[c];this._isVisible(i,l.getBoundingClientRect(),r)?(l.dataset.bstrSlide="active",s.push({index:c,target:l})):"active"==l.dataset.bstrSlide&&(l.dataset.bstrSlide="",n.push({index:c,target:l}))}this._moveCallback&&this._moveCallback({direction:e-a>0?"+":"-",slider:t,current:s,previous:n})}init(t=!1){let e=document.querySelectorAll(`${t||this._selector}:not([data-bstr-initd])`);for(let r of e){let a=r.querySelector("[data-bstr-slide-holder]"),o;r.dataset[this._idSelector]?o=r.dataset[this._idSelector]:(o=++this._currentIndex,r.dataset[this._idSelector]=o),r.setAttribute("data-bstr-initd","true"),a.dataset.bstrSliderId=o;let n=a.dataset.bstrSlideHolder.split("|");if(3==n.length)this._sliders[o]={lg:parseInt(n[0]),md:parseInt(n[1]),sm:parseInt(n[2])};else{let s=parseInt(n[0]);this._sliders[o]=isNaN(s)?{lg:1,md:1,sm:1}:{lg:s,md:s,sm:s}}let i=[...r.querySelectorAll("[data-bstr-slider-button]"),...document.querySelectorAll(`[data-bstr-slider-button][data-bstr-for-slider="${o}"]`)];for(let c of i)c.addEventListener("click",t=>{t.preventDefault(),t.stopImmediatePropagation(),this._move({slider:a,direction:c.dataset.bstrSliderButton||"+"})});this._parentMoveCallback(a),a.addEventListener("scroll",debounce(()=>this._parentMoveCallback(a),100),{passive:!0})}this._resize||(this._resizeHandler(),window.addEventListener("resize",debounce(this._resizeHandler.bind(this),250),{passive:!0}),this._resize=!0)}_resizeHandler(){window.innerWidth<this._breakpoints.sm?this.viewport="sm":window.innerWidth<this._breakpoints.md?this.viewport="md":this.viewport="lg",this.rawViewport=window.innerWidth}_moveTo({index:t=0,slider:e}){let r=parseInt(e.dataset.bstrSliderCurrent),a="vertical"==e.dataset.bstrSliderOrientation.toLowerCase(),o=e.querySelectorAll("[data-bstr-slide]");o.length&&(r=Math.max(Math.min(t,o.length-1),0),a?e.scrollTo(0,o[r].offsetTop-e.offsetTop):e.scrollTo(o[r].offsetLeft-e.offsetLeft-parseInt(window.getComputedStyle(e).paddingLeft),0))}_move({direction:t,slider:e}){let r=this._sliders[e.dataset.bstrSliderId][this.viewport],a=parseInt(e.dataset.bstrSliderCurrent),o=a,n="vertical"==e.dataset.bstrSliderOrientation.toLowerCase(),s=e.querySelectorAll("[data-bstr-slide]");if(!s.length)return;let i=n?Math.round(1/(s[0].offsetHeight/e.offsetHeight)):Math.round(1/(s[0].offsetWidth/(e.offsetWidth-parseInt(window.getComputedStyle(e).paddingLeft))));
2a="+"===t?Math.min(a+r,s.length-i):Math.max(a-r,0),e.dataset.bstrSlideLoop&&a===o&&(a="-"===t?s.length-i:0),n?e.scrollTo(0,s[a].offsetTop-e.offsetTop):e.scrollTo(s[a].offsetLeft-e.offsetLeft-parseInt(window.getComputedStyle(e).paddingLeft),0)}}class ProductSlider extends BstrSlider{constructor(t){super(t),this.initThumbs(),t.events.on("booster:content:update",this.initThumbs)}initThumbs(){let t=document.querySelectorAll("[data-bstr-slider-thumb]:not([data-bstr-initd])");for(let e of t){let r=e.dataset.bstrSliderFor,a=r?document.querySelector(`[data-bstr-ppslider="${r}"] [data-bstr-slide-holder]`):e.closest("[data-bstr-ppslider]"),o=parseInt(e.dataset.bstrSliderThumb);e.addEventListener("click",()=>this._moveTo({slider:a,index:o})),null!=e.getAttribute("data-bstr-slider-thumb-hover")&&e.addEventListener("mouseover",()=>this._moveTo({slider:a,index:o}))}}_moveCallback({slider:t,current:e}){if(!e.length)return;let r=t.dataset.bstrSliderId;for(let a of document.querySelectorAll(`.bstrSlider__thumb--active[data-bstr-slider-for="${r}"]`))a.classList.remove("bstrSlider__thumb--active");if(window.innerWidth<790){let o=0;for(let n of e){let s=n.target.children[0];s&&s.clientHeight>o&&(o=s.clientHeight)}o&&(t.closest("[data-bstr-ppslider]").style.maxHeight=`${o}px`)}else t.closest("[data-bstr-ppslider]").style.maxHeight=null;document.querySelector(`[data-bstr-slider-thumb="${e[0].index}"][data-bstr-slider-for="${r}"]`).classList.add("bstrSlider__thumb--active")}}class BstrSectionSlider extends BstrSlider{constructor(t){super(t)}_moveCallback(t){for(let{target:e}of t.previous){let r="bannerSlider"==e.dataset.type?e.querySelector("div"):e;"video"==r.dataset.type&&r.querySelector("video").pause(),r.classList.remove("slide__animation")}for(let{target:a}of t.current){let o="bannerSlider"==a.dataset.type?a.querySelector("div"):a;"video"==o.dataset.type&&o.querySelector("video").play(),o.classList.add("slide__animation")}"adaptive"==t.slider.dataset.sliderHolder&&(t.slider.style.height=`${t.current[0].target.offsetHeight}px`)}}class BstrStock{constructor({events:t}){this.events=t,this.stockInterval,this.initStock(),this.events.on("booster:content:update",this.initStock.bind(this))}async initStock(){this.stockInterval&&clearInterval(this.stockInterval);let t=document.querySelectorAll("[data-stock-type]");if(!t.length)return;let e=bstore.get("bstrStock")||{},r=[],a=parseInt(t[0].dataset.reduce);("inventory"==t[0].dataset.stockType||e.stockInfo!=t[0].dataset.stockType)&&(e={stockInfo:t[0].dataset.stockType});for(let o=0,n=t.length;o<n;++o){let s=t[o],i;if(e[s.dataset.product]?(i=e[s.dataset.product],r.push(s)):"inventory"==s.dataset.stockType?i=s.dataset.stockLeft:(i=getRandomInt(s.dataset.stockLeft/10,s.dataset.stockLeft),e[s.dataset.product]=i,r.push(s)),"inventory"==s.dataset.stockType)s.closestEl(".amount--left").style.width=getRandomInt(5,25)+"%";else{let c=Math.floor(i/s.dataset.stockLeft*25);c<5&&(c=5),s.closestEl(".amount--left").style.width=c+"%"}s.innerText=i}if(bstore.set("bstrStock",e,1440),a>0){var l=this;this.stockInterval=setInterval(()=>{l.stockManagement(r)},1e3*a)}}stockManagement(t){let e=bstore.get("bstrStock")||{};for(let r=0,a=t.length;r<a;++r){let o=t[r],n=parseInt(o.innerText);n>1&&--n,e[o.dataset.product]=n;let s=Math.floor(n/o.dataset.stockLeft*25);s<5&&(s=5),o.closestEl(".amount--left").style.width=s+"%",o.innerText=n}bstore.set("bstrStock",e,1440)}}class BstrSwatches{constructor({events:t,slider:e,cfx:r}){this.events=t,this.current={},this.variants={},this.THEME_UTILS=new BstrSwatchesTheme({swatches:this,events:t,slider:e,cfx:r}),this.initListeners(),this.events.on("booster:content:update",()=>{for(let t of(this.initListeners(),Object.keys(this.current)))this.filterSwatches(t)})}initListeners(){let t=this,e=document.querySelectorAll("[data-swatch-index]:not([data-booster-initd])");for(let r of e)"OPTION"!=r.tagName&&("SELECT"===r.tagName?r.addEventListener("change",e=>{let r=e.currentTarget,a=r.value,o=r.dataset.swatchIndex.trim().split("-"),n;n="bstrSelectNill"!==a&&a,t.setOption(o[0],parseInt(o[1]),n)}):r.addEventListener("click",e=>{let a=e.currentTarget;if("amazon"!=_settings.swatchLogic&&a.classList.contains("swatch--disabled")||_settings.disableSOSwatch&&a.dataset.swatchSoldout)return;let o=a.dataset.swatchIndex.trim().split("-"),n;n=!a.classList.contains("swatch--active")&&r.dataset.swatchOption,t.setOption(o[0],parseInt(o[1]),n)}),r.dataset.boosterInitd="true");if("false"!=_settings.preselectSwatch){let a=document.querySelectorAll("noscript[data-bstr-preselect]:not(data-bstr-initd)");if("firstOptionIndex"==_settings.preselectSwatch)for(let o of a)o.dataset.bstrInitd="true",Object.keys(this.current).includes(o.dataset.bstrSwatch)||this.setOption(o.dataset.bstrSwatch,0,this.getVariant(o.dataset.bstrSwatch,o.dataset.bstrPreselect).options[0]);else for(let n of a)n.dataset.bstrInitd="true",Object.keys(this.current).includes(n.dataset.bstrSwatch)||this.setProductVariant(n.dataset.bstrSwatch,n.dataset.bstrPreselect)}
2}getVariants(t){return this.variants[t]||(this.variants[t]=JSON.parse(document.querySelector(`noscript[data-bstr-swatch="${t}"]`).innerText)),this.variants[t]}getVariant(t,e){return this.getVariants(t)[e]}findVariant(t){let e=this.current[t],r=this.getVariants(t);for(let[a,o]of Object.entries(r)){let n=!0;for(let s=0;s<e.length;++s)if(!1!==e[s]&&o.options[s]!==e[s]){n=!1;break}if(n)return a}return!1}dropCombination(t,e){let r=this.getVariants(t),a=Object.values(r),o=[...this.current[t]],n=this.genArray(()=>[],0,o.length),s;for(let i=0;i<o.length;++i)if(!1!==o[i]&&i!==e){s=i;break}for(let{options:c}of a)if(c[e]==o[e])for(let l=0;l<c.length;++l)n[l].push(c[l]);for(let m=0;m<n.length;++m)m===e||n[m].includes(this.current[t][m])||(this.current[t][m]=!1);if(JSON.stringify(o)===JSON.stringify(this.current[t])&&(this.current[t][s]=!1,!this.findVariant(t)))return this.dropCombination(t,e)}validateOptions(t,e,r){let a=this.findVariant(t),o=!1;"boolean"!=typeof a&&(o=a),this.current[t]=e;let n=this.findVariant(t);!1===n?("amazon"===_settings.swatchLogic&&this.dropCombination(t,r),this.events.trigger("booster:swatch:update",{selectedVariant:!1,currentOptions:this.current[t],product:{id:t,variants:this.getVariants(t)}}),!1!==o&&this.events.trigger("booster:variant:deselect",{oldVariant:o,currentOptions:this.current[t],product:{id:t,variants:this.getVariants(t)}})):this.current[t].includes(!1)?(this.events.trigger("booster:swatch:update",{selectedVariant:!1,currentOptions:this.current[t],product:{id:t,variants:this.getVariants(t)}}),!1!==o&&this.events.trigger("booster:variant:deselect",{oldVariant:o,currentOptions:this.current[t],product:{id:t,variants:this.getVariants(t)}})):(this.events.trigger("booster:swatch:update",{selectedVariant:this.getVariant(t,n),currentOptions:this.current[t],product:{id:t,variants:this.getVariants(t)}}),this.events.trigger("booster:variant:select",{selectedVariant:this.getVariant(t,n),currentOptions:this.current[t],product:{id:t,variants:this.getVariants(t)}})),this.filterSwatches(t)}setOption(t,e,r){this.current[t]||(this.current[t]=Array(Object.values(this.getVariants(t))[0].options.length).fill(!1));let a=[...this.current[t]];a[e]=r,this.validateOptions(t,a,e)}setOptions(t,e){this.current[t]||(this.current[t]=Array(Object.values(this.getVariants(t))[0].options.length).fill(!1)),this.validateOptions(t,[...e],0)}setProductVariant(t,e){let r=this.getVariant(t,e);this.setOptions(t,r.options)}genArray(t,e,r){let a=[];for(let o=e;o<r;++o)a[o]=t.call();return a}matchesOptions(t,e){for(let r=0;r<e.length;++r)if(!1!==t[r]&&t[r]!=e[r])return!1;return!0}filterSwatches(t){let e=this.getVariants(t),r=this.current[t],a=r.length,o=this.genArray(()=>new Set,0,a);for(let n of Object.values(e))for(let s=0;s<a;++s)o[s].add(n.options[s]);for(let i=0;i<r.length;++i){let c=this.genArray(()=>new Set,0,a),l=[...r];for(let{options:m}of(l[i]=!1,Object.values(e)))if(this.matchesOptions(l,m))for(let u=0;u<a;++u)c[u].add(m[u]);o[i]=new Set([...o[i]].filter(t=>c[i].has(t)))}return this.events.trigger("booster:swatch:render",{pid:t,options:r,aOptions:o})}}class BstrSwatchesTheme{constructor({swatches:t,events:e,slider:r,cfx:a}){this.sw=t,this.cfx=a,this.slider=r,this.events=e,this.initEvents()}initEvents(){this.events.on("booster:variant:select",this.selectSwatch.bind(this)),this.events.on("booster:variant:deselect",this.deselectSwatch.bind(this)),_settings.variantShowImage&&this.events.on("booster:swatch:update",this.scrollToImage.bind(this)),this.events.on("booster:swatch:render",this.renderSwatches.bind(this))}renderSwatches({pid:t,options:e,aOptions:r}){for(let a=0;a<r.length;++a){let o=document.querySelectorAll(`[data-swatch-index="${t}-${a}"]`);for(let n of o)"OPTION"==n.tagName?r[a].has(n.value)?n.removeAttribute("disabled"):n.setAttribute("disabled","true"):"SELECT"!==n.tagName&&(r[a].has(n.dataset.swatchOption)?n.classList.remove("swatch--disabled"):n.classList.add("swatch--disabled"))}for(let s of document.querySelectorAll(`.swatch--active[data-swatch-index^="${t}"]`))s.classList.remove("swatch--active");for(let i=0;i<e.length;++i)!1===e[i]?(document.querySelectorAll(`span[data-swatch-selected-name="${t}-${i}"]`).forEach(t=>t.innerText=""),document.querySelectorAll(`select[data-swatch-index="${t}-${i}"]`).forEach(t=>t.value="bstrSelectNill")):document.querySelectorAll(`span[data-swatch-selected-name="${t}-${i}"]`).forEach(t=>t.innerText=" - "+e[i]);let c=[];for(let l=0;l<e.length;++l)!1!==e[l]&&(c.push(...document.querySelectorAll(`[data-swatch-option="${CSS.escape(e[l])}"][data-swatch-index="${t}-${l}"]`)),c.push(...document.querySelectorAll(`option[value="${CSS.escape(e[l])}"][data-swatch-index="${t}-${l}"]`)));for(let m of c)"OPTION"==m.tagName?m.closest("select").value=m.value:m.classList.add("swatch--active")}scrollToImage(t){let e="",r=t.currentOptions.length,a=Array(2*r).fill("#");a[0]="|",a[2*r-1]="|";let o=Array(r).fill("*");if(o[0]="^",o[r-1]="$",t.currentOptions.some(t=>!1!==t)){if(t.currentOptions.includes(!1))for(let n=0;n<2*r;n+=2)!1!==t.currentOptions[n/2]&&(e+=`[data-variants${o[n/2]}="${a[n]}${CSS.escape(t.currentOptions[n/2])}${a[n+1]}"]`);else{let s="";for(let i=0;i<2*r;i+=2)s+=`${a[i]}${CSS.escape(t.currentOptions[i/2])}${a[i+1]}`;e=`[data-variants="${s}"]`.replace(/##/g,"#")}let c=document.querySelector(e);
2if(c){let l=c.closest("[data-bstr-slide-holder]"),m=Array.from(l.children).indexOf(c);this.slider._moveTo({index:m,slider:l})}}}selectSwatch(t){let e=t.product.id,r=t.selectedVariant.price,a=t.selectedVariant,o=document.querySelectorAll(`[data-product-price="${e}"]`),n=a.sale_raw;o.forEach(t=>{t.innerText=r,n?t.classList.add("product__price--sale"):t.classList.remove("product__price--sale")}),document.querySelectorAll(`[data-tag-product="${e}"]`).forEach(t=>{let e=!!n&&t.dataset.tagType;switch(e){case"percent":t.innerText=Math.floor((a.price_raw-a.sale_raw)/a.sale_raw*100)+"% "+_bstrLocale.tags.off;break;case"amount":t.innerText=this.cfx.formatMoney(a.sale_raw-a.price_raw,this.cfx.getFormat());break;case"text":t.innerText=_bstrLocale.tags.sale.toUpperCase();break;default:t.classList.add("hide")}e&&t.classList.remove("hide")}),document.querySelectorAll(`[data-product-price-sale="${e}"]`).forEach(t=>{if(!n)return t.classList.add("hide");t.innerText=a.sale,t.classList.remove("hide")});let s=document.querySelectorAll(`input[data-bstr-variant-input="${t.product.id}"]`);for(let i of s)i.setAttribute("value",t.selectedVariant.id);let c=document.querySelectorAll(`[data-buy-button="${t.product.id}"]`);for(let l of c)a.available?(l.querySelector("[data-button-text]").innerText=l.dataset.originalText,l.removeAttribute("disabled")):(l.querySelector("[data-button-text]").innerText=_bstrLocale.buttons.sold_out,l.setAttribute("disabled","true"));let m=document.querySelectorAll(`[data-dynamic-button="${t.product.id}"]`);for(let u of m){let d=u.querySelector("button");d&&(a.available?d.removeAttribute("disabled"):d.setAttribute("disabled","true"))}let h=new URL(document.URL);h.searchParams.set("variant",t.selectedVariant.id),history.replaceState({},"",h),this.events.trigger("booster:price:update",{elements:o})}deselectSwatch(t){let e=document.querySelectorAll(`input[data-bstr-variant-input="${t.product.id}"]`);for(let r of e)r.setAttribute("value",-1);let a=document.querySelectorAll(`[data-buy-button="${t.product.id}"]`);for(let o of a)o.setAttribute("disabled","true"),o.querySelector("[data-button-text]").innerText=_bstrLocale.buttons.select;let n=document.querySelectorAll(`[data-dynamic-button="${t.product.id}"]`);for(let s of n){let i=s.querySelector("button");i&&i.setAttribute("disabled","true")}let c=new URL(document.URL);c.searchParams.delete("variant"),history.replaceState({},"",c)}}class BstrVisitor{constructor({events:t,basync:e,geo:r=!0}){this.events=t,this.geo=r,this.basync=e,this.customer=!1,this.map={"%country%":{k:"country",sk:"name"},"%city%":{k:"city",sk:"name"},"%zip%":{k:"city",sk:"zip"},"%flag_svg%":{k:"flag",sk:"svg"},"%flag_emoji%":{k:"flag",sk:"emoji"},"%language_name%":{k:"language",sk:"name"},"%language_native%":{k:"language",sk:"nativeName"},"%language_code%":{k:"language",sk:"code"},"%currency_code%":{k:"currency",sk:"code"},"%currency_name%":{k:"currency",sk:"name"},"%currency_symbol%":{k:"currency",sk:"symbol"}},this.init()}replaceContent(t){let e=""==t.dataset.bstrGeoBlock?t.innerHTML:t.dataset.bstrGeoBlock;for(let[r,a]of Object.entries(this.map))e=e.replace(RegExp(r,"gi"),a.sk?this.customer[a.k][a.sk]:this.customer[a.k]);t.innerHTML=e}embedGeo(){let t=document.querySelectorAll("[data-bstr-geo-block]:not([data-bstr-initd])");for(let e of t)this.replaceContent(e),e.dataset.bstrInitd="true",e.removeAttribute("data-bstr-geo-block")}
2async init(){if(bstore.get("bstr:visitor_info"))return this.customer=bstore.get("bstr:visitor_info"),this.embedGeo(),this.events.on("booster:content:update",this.embedGeo.bind(this)),this.events.trigger("booster:geo:visitor",this.customer,!0);let t=await fetch("https://js.instantgeo.info/json");t.ok||this.events.trigger("booster:geo:error");let{country:e,city:r,postalCode:a="00000",ip:o="0.0.0.0"}=t.ok?await t.json():{country:"US",city:"Washington, D.C."},n=new URL(window.location);n.pathname=bstri18n.all_products_route,n.searchParams.set("sort_by",e||"US");let{json:s}=await this.basync.load({url:n,section:"countries",json:"div#countries-json"});if(!s)return this.events.trigger("booster:geo:error");let{capital:i,region:c,name:l,nativeName:m,currency:u,languages:d,flag:h,emoji:y}=s,f=d[0],p=f.iso639_1.toLowerCase();switch(e){case"BR":p="pt-br";break;case"PT":p="pt-pt"}return this.customer={ip:o,country:{code:e,name:l,nativeName:m,capital:i},region:c,city:{name:r,zip:a,capital:i.toLowerCase()==r.toLowerCase()},language:{code:p,name:f.name,nativeName:f.nativeName},currency:u,flag:{svg:`<img src="${h}" style="height: 1em">`,emoji:y.split(" ").reduce((t,e)=>t+=String.fromCodePoint(parseInt(e,16)),"")}},bstore.set("bstr:visitor_info",this.customer,180),this.embedGeo(),this.events.on("booster:content:update",this.embedGeo.bind(this)),this.events.trigger("booster:geo:visitor",this.customer,!0)}get(){return this.customer}}class BstrTheme{constructor(){this.events=new BstrEvents,this.basync=new BstrAsync({events:this.events}),this.initFeaturedProducts(),document.dispatchEvent(new CustomEvent("booster:initialized",{detail:{BoosterTheme:this}})),this.notify=new BstrNotify({events:this.events}),this.cart=new BstrCart({events:this.events,basync:this.basync}),this.lazy=new BstrLazy({events:this.events}),this.defaultSlider=new BstrSlider({events:this.events}),this.PPSlider=new ProductSlider({events:this.events,selector:"[data-bstr-ppslider]"}),this.sectionSlider=new BstrSectionSlider({events:this.events,selector:"[data-bstr-section-slider]"}),this.cfx=new BstrCurrency({events:this.events}),this.swatches=new BstrSwatches({events:this.events,slider:this.PPSlider,cfx:this.cfx}),this.counters={cart:new BstrCntr('[data-bstr-cntr-id^="c-"]'),watching:new BstrCntr('[data-bstr-cntr-id^="w-"]')},this.countdown=new BstrCountdown({events:this.events}),this.filters=new BstrFilters({events:this.events,basync:this.basync}),this.insta=BstrDummyClass,this.visitor=new BstrVisitor({events:this.events,basync:this.basync}),this.localize=new BstrLocalize({events:this.events,cfx:this.cfx}),this.freeShippingBar=new BstrFreeShipping({events:this.events,cfx:this.cfx}),this.inlineUpsell=new BstrIU({events:this.events,cfx:this.cfx,swatches:this.swatches}),this.ELEMENTS=new BstrElements({events:this.events,basync:this.basync,cart:this.cart,cfx:this.cfx}),(""!=_settings.OPDynTitle.trim()||""!=_settings.BPDynTitle.trim())&&(this.dynt=new BstrDynTitle),_settings.copycat&&(this.copycat=new BstrCopycat),_settings.gdpr&&(this.gdpr=new BstrGDPR),_settings.recentlyBought&&"undefined"!=typeof recentlyBoughtConfig&&(this.recentlyBought=new BstrRecentlyBought),this.events.trigger("booster:loaded",{BoosterTheme:this})}async initFeaturedProducts(){try{let t=document.querySelectorAll("[data-featured-product]");for(let e=0,r=t.length;e<r;++e)this.renderFeaturedProduct(t[e])}catch{}}}const bstore=new BstrStore,BoosterTheme=new BstrTheme;console.info('888888b.                              888                88888888888 888                                      \n888  "88b                             888                    888     888                                      \n888  .88P                             888                    888     888                                      \n8888888K.   .d88b.   .d88b.  .d8888b  888888 .d88b.  888d888 888     88888b.   .d88b.  88888b.d88b.   .d88b.  \n888  "Y88b d88""88b d88""88b 88K      888   d8P  Y8b 888P"   888     888 "88b d8P  Y8b 888 "888 "88b d8P  Y8b \n888    888 888  888 888  888 "Y8888b. 888   88888888 888     888     888  888 88888888 888  888  888 88888888 \n888   d88P Y88..88P Y88..88P      X88 Y88b. Y8b.     888     888     888  888 Y8b.     888  888  888 Y8b.     \n8888888P"   "Y88P"   "Y88P"   88888P\'  "Y888 "Y8888  888     888     888  888  "Y8888  888  888  888  "Y8888  ');

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.