1if(console.log("Proteus Treatments - 0.07"),getParam("qa")){let variation="v1";getParam("var")&&(variation=getParam("var")),window.sessionStorage.setItem(getParam("qa"),variation)}waitUntil(()=>window.sessionStorage.getItem("DS-03")||!1).then(()=>{observeSelector("body",doc=>{console.log("init [DS-03] -- 0.04 -- v1");const incentives_goals=[{threshold:4e3,message:"FREE MAGNET",label:"magnet",var_id:"31903251169362"},{threshold:7e3,message:"FREE SHIPPING",label:"free shipping",var_id:"none"},{threshold:1e4,message:"FREE CHILLIES",label:"chillies",var_id:"42725178704043"},{threshold:15e3,message:"FREE DISH TOWELS",label:"towels",var_id:"40806724337835"}],checkmark_svg=`<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" height="800px" width="800px" version="1.1" id="Capa_1" viewBox="0 0 17.837 17.837" xml:space="preserve"> 2 <g> 3 <path d="M16.145,2.571c-0.272-0.273-0.718-0.273-0.99,0L6.92,10.804l-4.241-4.27 c-0.272-0.274-0.715-0.274-0.989,0L0.204,8.019c-0.272,0.271-0.272,0.717,0,0.99l6.217,6.258c0.272,0.271,0.715,0.271,0.99,0 L17.63,5.047c0.276-0.273,0.276-0.72,0-0.994L16.145,2.571z"/> 4 </g> 5 </svg>`;doc.insertAdjacentHTML("afterbegin",` 6 <style> 7 .js-hidden{ 8 display: none; 9 opacity: 0; 10 position: absolute; 11 left: -9999px; 12 } 13 14 /* --- START INCENTIVES MODULE --- */ 15 16 .js-incentives{ 17 color: #fff; 18 } 19 20 #slidecarthq .slidecarthq.cartEmpty > .js-incentives{ 21 display: none; 22 } 23 24 .js-incentives-mesage{ 25 font-size: 13px; 26 color: #000; 27 font-family: "Avenir", "Avenir", "Avenir Next", sans-serif; 28 line-height: 1.6em; 29 letter-spacing: .1em; 30 text-transform: uppercase; 31 text-align: center; 32 margin-bottom: .5rem; 33 } 34 35 .js-incentives-mesage strong{ 36 font-weight: 900; 37 } 38 39 .js-incentives--bar{ 40 background: #f4ac3c; 41 border-radius: 25px; 42 height: 6px; 43 position: relative; 44 margin-bottom: 2rem; 45 } 46 47 .js-incentives--bar--filled{ 48 transition: .5s ease width; 49 width: 10%; 50 background: #d5137b; 51 border-radius: 25px; 52 height: 6px; 53 position: absolute; 54 left: 0; 55 top: 0; 56 } 57 58 .js-incentives--goals{ 59 60 } 61 62 .js-incentives--threshold{ 63 position: absolute; 64 top: 0; 65 } 66 67 .js-incentives--threshold--dot{ 68 width: 18px; 69 height: 18px; 70 border-radius: 100%; 71 background: #f4ac3c; 72 position: absolute; 73 top: -6px; 74 left: -18px; 75 } 76 77 .js-incentives--threshold.js-threshold-met .js-incentives--threshold--dot{ 78 background: #d5137b; 79 } 80 81 .js-incentives--threshold--dot--icon{ 82 transition: .5s ease opacity; 83 opacity: 0; 84 padding: 3px; 85 } 86 87 .js-incentives--threshold.js-threshold-met .js-incentives--threshold--dot--icon{ 88 opacity: 1; 89 } 90 91 .js-incentives--threshold--dot--icon svg{ 92 position: absolute; 93 top: 15%; 94 left: 15%; 95 height: 70%; 96 width: 70%; 97 fill: #fff !important; 98 } 99 100 .js-incentives--threshold--label{ 101 color: #000; 102 position: absolute; 103 font-size: 11px; 104 top: 16px; 105 right: -30px; 106 width: 78px; 107 text-align: center; 108 opacity: 1; 109 } 110 111 .js-incentives--threshold--label span:first-child, 112 .js-incentives--threshold.js-reveal .js-incentives--threshold--label span:last-child{ 113 display: none; 114 } 115 116 .js-incentives--threshold.js-reveal .js-incentives--threshold--label span:first-child, 117 .js-incentives--threshold--label span:last-child{ 118 display: block; 119 } 120 121 .js-incentives--threshold.js-reveal .js-incentives--threshold--label{ 122 font-weight: 900; 123 } 124 125 </style> 126 `),observeSelector(".cart__mini-wrapper > div > div.tracking-widest",cart_rewards=>{cart_rewards.querySelector("div:first-child").classList.add("js-hidden"),getParam("cart")=="open"&&waitUntil(()=>document.querySelectorAll(".cart__mini-wrapper .cart__main").length>0).then(()=>{setTimeout(()=>{document.querySelector("header.header > div:last-child > button:last-child").click()},500)}).catch();let thresholds_html="",incentives_max=incentives_goals[incentives_goals.length-1].threshold;for(let i=0;i<incentives_goals.length;i++){let range_position=incentives_goals[i].threshold/incentives_max*100;thresholds_html=thresholds_html+` 127 <div class="js-incentives--threshold" data-threshold="${incentives_goals[i].threshold}" data-var-id="${incentives_goals[i].var_id}" style="left: ${range_position}%;" data-label="${incentives_goals[i].message}"> 128 <div class="js-incentives--threshold--dot"> 129 <div class="js-incentives--threshold--dot--icon">${checkmark_svg}</div> 130 </div> 131 <div class="js-incentives--threshold--label">
132 <span>${incentives_goals[i].label}</span> 133 <span>$${incentives_goals[i].threshold/100}</span> 134 </div> 135 </div> 136 `}cart_rewards.insertAdjacentHTML("beforebegin",` 137 <div class="js-incentives"> 138 <div class="js-incentives-mesage">Status...</div> 139 <div class="js-incentives--bar"> 140 <div class="js-incentives--bar--filled"></div> 141 <div class="js-incentives--goals"> 142 ${thresholds_html} 143 </div> 144 </div> 145 </div> 146 `);const update_incentives_module=current_cart_subtotal=>{let incentives_message=document.querySelector(".js-incentives-mesage"),incentives_bar_filled=document.querySelector(".js-incentives--bar--filled"),incentives_message_set=!1,earned_incentives=[];current_cart_subtotal>=incentives_max?(incentives_bar_filled.style.width="100%",incentives_message.innerHTML="<strong>FREE STUFF</strong> is headed your way!"):incentives_bar_filled.style.width=`${current_cart_subtotal/incentives_max*100}%`;let incentives_thresholds=document.querySelectorAll(".js-incentives--threshold");for(let i=0;i<incentives_thresholds.length;i++){let incentives_message_html="",threshold_amount=parseInt(incentives_thresholds[i].getAttribute("data-threshold")),threshold_label=incentives_thresholds[i].getAttribute("data-label"),threshold_var_id=incentives_thresholds[i].getAttribute("data-var-id");if(current_cart_subtotal>=threshold_amount?(incentives_thresholds[i].classList.add("js-threshold-met"),incentives_thresholds[i].classList.add("js-reveal"),threshold_var_id!="none"&&(earned_incentives.push(threshold_var_id),console.log("earned_incentives",earned_incentives))):(incentives_thresholds[i].classList.remove("js-threshold-met"),incentives_thresholds[i].classList.remove("js-reveal")),incentives_message_set||current_cart_subtotal<threshold_amount&&(incentives_message_html=`Only $${((threshold_amount-current_cart_subtotal)/100).toFixed(0)} away from <strong>${threshold_label}</strong>`,incentives_message.innerHTML=incentives_message_html,incentives_message_set=!0),i==incentives_thresholds.length-1){let items_to_auto_add=[];for(let ii=0;ii<earned_incentives.length;ii++)document.querySelector(".cart__main").innerHTML.indexOf(`?variant=${earned_incentives[ii]}`)==-1?items_to_auto_add.push(earned_incentives[ii]):document.querySelectorAll(`.cart__main a[href*="?variant=${earned_incentives[ii]}"]`).length>0&&document.querySelector(`.cart__main a[href*="?variant=${earned_incentives[ii]}"]`).parentNode.parentNode.classList.add("js-free"),ii==earned_incentives.length-1&&items_to_auto_add.length>0&&cart_add_item(items_to_auto_add[0],1,()=>{items_to_auto_add.length>1?cart_add_item(items_to_auto_add[1],1,()=>{window.location=window.location.origin+window.location.pathname+"?cart=open&qa=DS-03"}):window.location=window.location.origin+window.location.pathname+"?cart=open&qa=DS-03"})}}},review_cart_items=()=>{observeSelector(".cart__main .items-center a",cart_item=>{cart_item.parentNode.querySelector("[x-price]")&&cart_item.parentNode.querySelector("[x-price]").innerText=="$0"&&(cart_item.href.indexOf("31903251169362")>-1?cart_item.parentNode.querySelector("[x-price]").innerHTML="<s>$3</s> <strong>FREE</strong>":cart_item.href.indexOf("30982564610130")>-1?cart_item.parentNode.querySelector("[x-price]").innerHTML="<s>$12</s> <strong>FREE</strong>":cart_item.href.indexOf("40806724337835")>-1?cart_item.parentNode.querySelector("[x-price]").innerHTML="<s>$30</s> <strong>FREE</strong>":cart_item.parentNode.querySelector("[x-price]").innerHTML="FREE")})};observeSelector('.cart__footer form button[type="submit"] > span:last-child',cart_subtotal=>{update_incentives_module(parseFloat(cart_subtotal.innerText.replace("$","")).toFixed(2)*100);const innerText_observer=new MutationObserver(function(mutationsList){for(let mutation of mutationsList)if(mutation.type==="childList"&&mutation.target===cart_subtotal){const new_InnerText=cart_subtotal.innerText;let cart_subtotal_price=parseFloat(new_InnerText.replace("$","")).toFixed(2);update_incentives_module(cart_subtotal_price*100),review_cart_items()}}),observerConfig={childList:!0,subtree:!0};innerText_observer.observe(cart_subtotal,observerConfig)})})})}).catch(),waitUntil(()=>window.sessionStorage.getItem("DS-05")||!1).then(()=>{waitForElement("body.template-index").then(()=>{console.log("init [DS-05] -- 0.01 -- v2"),waitForElement("#shopify-section-template--15984055189675__hero").then(hp_hero=>{let height_setting="auto",width_setting="100%";window.innerHeight*1.5>window.innerWidth&&(height_setting="100%",width_setting="auto"),hp_hero.classList.add("js-hp-hero"),hp_hero.insertAdjacentHTML("afterbegin",` 147 <style> 148 149 .js-hp-hero{ 150 overflow: hidden; 151 position: relative; 152 } 153 154 .js-hp-hero video{ 155 opacity: 1; 156 position: absolute; 157 z-index: 1; 158 top: 50%; 159 left: 50%; 160 transform: translateY(-50%) translateX(-50%); 161 height: ${height_setting}; 162 width: ${width_setting}; 163 } 164 </style> 165 166 <video id="js-hp-hero-video" autoplay="autoplay" loop="loop" playsinline="playsinline" class="media-video" muted="muted" preload="none" aria-label="The freshest spices start with farmers"> 167 <source src="https://cdn.shopify.com/videos/c/o/v/a6f672df4bf34252b52425a7c9ddf4de.mp4" type="video/mp4"> 168 </video> 169 170 `)}).catch()}).catch()}).catch(),waitUntil(()=>window.sessionStorage.getItem("DS-07")||!0).then(()=>{observeSelector("body",doc=>{console.log("init [DS-07] -- 0.02 -- v1"),doc.insertAdjacentHTML("afterbegin",` 171 <style> 172 .js-hidden{ 173 display: none; 174 opacity: 0; 175 position: absolute; 176 left: -9999px; 177 } 178 179 /* --- START INCENTIVES MODULE --- */ 180 181 .collection-subhead .sticky h2{ 182 transition: .5s ease all; 183 padding-top: 5rem; 184 } 185 186 [data-spice-in-cart="0"] .collection-subhead .sticky h2{ 187 padding-top: 0; 188 } 189 190 #js-incentives-module{ 191 transition: .5s ease all; 192 position: absolute; 193 top: 5rem; 194 left: 1rem; 195 border: 5px solid #D5137B; 196 width: calc(320px - 1rem); 197 padding: 1rem; 198 background: #FAE600; 199 border-radius: .75rem; 200 opacity: 1; 201 text-transform: uppercase; 202 letter-spacing: 0.15em; 203 font-weight: 800; 204 margin-bottom: 0.2em; 205 font-size: 0.625em; 206 } 207 208 #js-incentives-module--in-cart{ 209 transition: .5s ease all; 210 padding: 1rem 1rem 2rem 1rem; 211 background: #FAE600; 212 border-radius: .75rem; 213 text-transform: uppercase; 214 letter-spacing: 0.15em; 215 font-weight: 800; 216 margin-bottom: 0.2em; 217 font-size: 0.625em; 218 } 219 220 #js-incentives-module .js-big-pink{ 221 color: #d5137b; 222 font-size: .85rem; 223 display: block; 224 } 225 226 [data-spice-in-cart="0"] #js-incentives-module{ 227 opacity: 0; 228 } 229 230 .js-progress-bar{ 231 height: 5px; 232 width: 100%; 233 position: relative; 234 top: 4px; 235 border-radius: 25px; 236 background: #ffbb00; 237 } 238 239 .js-progress-bar--filled{ 240 transition: .5s ease all; 241 background: #d5137b; 242 position: absolute; 243 width: 0%; 244 max-width: 100%; 245 top: 0; 246 left: 0; 247 height: 5px; 248 border-radius: 25px; 249 } 250 251 [class*="js-progress-bar--dot"]{ 252 position: absolute; 253 top: 50%; 254 transform: translateY(-50%); 255 width: 14px; 256 height: 14px; 257 border-radius: 100%; 258 background: #ffbb00; 259 transition: .5s ease all; 260 } 261 262 .js-progress-bar--dot--1{ 263 left: calc(25% - 7px); 264 } 265 266 .js-progress-bar--dot--2{ 267 left: calc(50% - 7px); 268 } 269 270 .js-progress-bar--dot--3{ 271 left: calc(75% - 7px); 272 } 273 274 .js-progress-bar--dot--4{ 275 left: calc(100% - 7px); 276 } 277
278 [data-pack-progress="1"] .js-progress-bar--dot--1, 279 [data-pack-progress="2"] .js-progress-bar--dot--1, 280 [data-pack-progress="2"] .js-progress-bar--dot--2, 281 [data-pack-progress="3"] .js-progress-bar--dot--1, 282 [data-pack-progress="3"] .js-progress-bar--dot--2, 283 [data-pack-progress="3"] .js-progress-bar--dot--3, 284 [data-pack-progress="4"] .js-progress-bar--dot--1, 285 [data-pack-progress="4"] .js-progress-bar--dot--2, 286 [data-pack-progress="4"] .js-progress-bar--dot--3, 287 [data-pack-progress="4"] .js-progress-bar--dot--4{ 288 background: #d5137b; 289 } 290 291 #js-incentives-module--in-cart .js-progress-bar--dot--1:after, 292 #js-incentives-module--in-cart .js-progress-bar--dot--2:after, 293 #js-incentives-module--in-cart .js-progress-bar--dot--3:after, 294 #js-incentives-module--in-cart .js-progress-bar--dot--4:after{ 295 position: absolute; 296 top: 1rem; 297 left: -20px; 298 white-space: nowrap; 299 width: 50px; 300 text-align: center; 301 color: #d5137b; 302 font-weight: 600; 303 content: ""; 304 opacity: 0; 305 } 306 307 #js-incentives-module--in-cart[data-pack-progress="0"] .js-progress-bar--dot--1:after { 308 content: "3 Tins"; 309 opacity: 1; 310 } 311 312 #js-incentives-module--in-cart[data-pack-progress="1"] .js-
312progress-bar--dot--2:after { 313 content: "6 Tins"; 314 opacity: 1; 315 } 316 317 #js-incentives-module--in-cart[data-pack-progress="2"] .js-progress-bar--dot--3:after { 318 content: "9 Tins"; 319 opacity: 1; 320 } 321 322 #js-incentives-module--in-cart[data-pack-progress="3"] .js-progress-bar--dot--4:after, 323 #js-incentives-module--in-cart[data-pack-progress="4"] .js-progress-bar--dot--4:after{ 324 content: "12 Tins"; 325 left: -30px; 326 opacity: 1; 327 } 328 329 @media(max-width: 1000px){ 330 .filter-wrapper.js-dropdown-wrapper{ 331 display: none; 332 position: absolute; 333 left: -9999px; 334 opacity: 0; 335 } 336 .collection-subhead .sticky h2{ 337 padding-top: 1rem; 338 } 339 340 #js-incentives-module{ 341 left: auto; 342 right: 1.5rem; 343 } 344 } 345 346 @media(max-width: 650px){ 347 348 #js-incentives-module{ 349 right: auto; 350 left: 50%; 351 transform: translateX(-50%); 352 top: calc(100vh - 210px); 353 } 354 } 355 356 </style> 357 `),waitForElement("#scrolling-navigation").then(sticky_nav=>{sticky_nav.insertAdjacentHTML("beforeend",` 358 <div id="js-incentives-module"> 359 <div class="js-box-text">Save on tins in packs of 3</div> 360 <div class="js-total-saved"></div> 361 <div class="js-big-pink"></div> 362 <div class="js-progress-bar"> 363 <div class="js-progress-bar--filled"></div> 364 <div class="js-progress-bar--dot--1"></div> 365 <div class="js-progress-bar--dot--2"></div> 366 <div class="js-progress-bar--dot--3"></div> 367 <div class="js-progress-bar--dot--4"></div> 368 </div> 369 </div> 370 `);const update_incentives_module=incentives_module_id=>{let tins_count=Math.floor(document.documentElement.getAttribute("data-spice-in-cart")),packs_count=Math.floor(document.documentElement.getAttribute("data-spice-in-cart")/3),to_next_pack=3-document.documentElement.getAttribute("data-spice-in-cart")%3;packs_count>=4&&(packs_count=4,to_next_pack=0);const savings_thresholds={1:"1.50",2:"3.50",3:"6.00",4:"9.00"};let class_if_zero_packs=tins_count==0?"js-hidden":"",class_if_not_zero_packs=tins_count>0?"js-hidden":"";if(document.querySelectorAll(`#${incentives_module_id}`).length>0){console.log("do the update_incentives_module()");let incentives_module=document.querySelector(`#${incentives_module_id}`);incentives_module.setAttribute("data-pack-progress",packs_count),incentives_module.querySelector(".js-box-text").classList.value=`js-box-text ${class_if_not_zero_packs}`,incentives_module.querySelector(".js-total-saved").classList.value=`js-total-saved ${class_if_zero_packs}`,observeSelector("[data-pack-progress] .js-progress-bar--filled",filled_bar=>{filled_bar.style.width=`${tins_count/12*100}%`}),tins_count>11?(incentives_module.querySelector(".js-total-saved").innerHTML="",incentives_module.querySelector(".js-big-pink").innerHTML=`You've saved $${savings_thresholds[packs_count]}`):tins_count>2?(incentives_module.querySelector(".js-total-saved").innerHTML=`You've saved $${savings_thresholds[packs_count]} on spice tins`,incentives_module.querySelector(".js-big-pink").innerHTML=`add ${to_next_pack} more to save $${savings_thresholds[packs_count+1]}`):(incentives_module.querySelector(".js-total-saved").innerHTML="Save on tins in packs of 3",incentives_module.querySelector(".js-big-pink").innerHTML=`add ${to_next_pack} more to save $${savings_thresholds[packs_count+1]}`)}};update_incentives_module("js-incentives-module"),update_incentives_module("js-incentives-module--in-cart"),new MutationObserver(mutationsList=>{for(const mutation of mutationsList)mutation.type==="attributes"&&mutation.attributeName==="data-cart-qty"&&(console.log("qty updated"),update_incentives_module("js-incentives-module"),update_incentives_module("js-incentives-module--in-cart"))}).observe(document.documentElement,{attributes:!0})}).catch()})}).catch(); 371//# sourceMappingURL=/cdn/shop/t/151/assets/_proteus-treatments.js.map?v=130962399209142336501730198337
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.