PageSourceSearch

https://www.indicaid.com/cdn/shop/t/100/assets/foxkit-app.min.js?v=163413919784859699981722591753

js indicaid.com collected 2026-09-24 11:47:49 UTC 25,947 bytes, 1 lines download raw bytes

1!function(){var t={7345:function(t,e,n){"use strict";n.r(e);var o=n(4942);const i=window.__i18n||new class{constructor(){var t,e;(0,o.Z)(this,"shop_locale",(null===(t=window.spratlyThemeSettings)||void 0===t||null===(e=t.shop_locale)||void 0===e?void 0:e.current)||"en"),(0,o.Z)(this,"locales",{default:{add_button:"Add",added_button:"Added",bundle_button:"Add selected item(s)",bundle_saved:"Saved",bundle_select:"Select",bundle_selected:"Selected",bundle_this_item:"This item",bundle_total:"Total price",checkout:"Checkout",discount_summary:"You will get <strong>{discount_value} OFF</strong> on each product",discount_title:"SPECIAL OFFER",free:"FREE",incart_title:'Customers also bought with "{product_title}"',prepurchase_added:"You just added",prepurchase_title:'Frequently bought with "{product_title}"',qty_discount_note:"on each product",qty_discount_title:"{item_count} item(s) get {discount_value} OFF",sizechart_button:"Size chart",field_name:"Enter your name",field_email:"Enter your email",field_birthday:"Date of birth",discount_noti:"* Discount will be calculated and applied at checkout",fox_discount_noti:"* You are entitled to 1 discount offer of <span>{price}</span> (<span>{discount_title}</span>). This offer <b>can't be combined</b> with any other discount you add here!",bis_open:"Notify me when available",bis_heading:"Back in stock alert 📬",bis_desc:"We will send you a notification as soon as this product is available again.",bis_submit:"Notify me",bis_email:"Your email",bis_name:"Your name",bis_phone:"Your phone number",bis_note:"Your note",bis_signup:"Email me with news and offers",bis_thankyou:"Thank you! We'll send you an email when this product is available!",preorder_discount_title:"🎁 Preorder now to get <strong>{discount_value} OFF</strong>",preorder_shipping_note:"🚚 Item will be delivered on or before <strong>{eta}</strong>"}}),(0,o.Z)(this,"tr",((t,e={})=>{var n;const{locales:o,shop_locale:i}=this;let s=(null===(n=o[i])||void 0===n?void 0:n[t])||o.default[t]||`Foxkit: translation missing for ${t}!`;return Object.keys(e).length&&Object.entries(e).forEach((([t,e])=>s=s.replace(`{${t}}`,e))),s})),(0,o.Z)(this,"setLocales",((t,e)=>{this.locales[t]=e}))}};window.__i18n=window.__i18n||i,e.default=i},6295:function(t,e,n){"use strict";n.r(e);n(2422);e.default=new class{constructor(){return this.component=this.component.bind(this),this.component}component(t,e,...n){if("function"==typeof t)return t({...e,children:n});n&&(n=n.filter((t=>null!==t))),e&&(e.class&&(e.className=e.class),delete e.children);let o="fragment"!==t?function(t,e){e=e||{};let n=document.createElement(t);try{n=Object.assign(n,e)}catch{const t=Object.keys(e);for(let o=0;o<t.length;o++)"dataSet"!==e[o]&&n.setAttribute(t[o],e[t[o]])}return n}(t,e):document.createDocumentFragment();if(-1!==["svg","path","rect","text","circle","g"].indexOf(t)){o=document.createElementNS("http://www.w3.org/2000/svg",t);for(const t in e){const n="className"===t?"class":t;o.setAttribute(n,e[t])}}for(const t of n)Array.isArray(t)?o.append(...t):o.append(t);if(null!=e&&e.dataSet)for(const t in e.dataSet)Object.prototype.hasOwnProperty.call(e.dataSet,t)&&(o.dataset[t]=e.dataSet[t]);return e&&!window.__aleartedJSXData&&Object.keys(e).find((t=>t.match(/^data-/)))&&(alert("Do not use data-* in your JSX component! Use dataSet instead!! - Check the console.trace for more info"),window.__aleartedJSXData=!0),null!=e&&e.ref&&("function"==typeof e.ref?e.ref(o):e.ref=o),null!=e&&e.on&&Object.entries(e.on).forEach((([t,e])=>{o.addEventListener(t,e)})),null!=e&&e.style&&Object.entries(e.style).forEach((([t,e])=>{o.style.setProperty(t,e)})),o}}},2422:function(){!function(){function t(){var t=Array.prototype.slice.call(arguments),e=document.createDocumentFragment();t.forEach((function(t){var n=t instanceof Node;e.appendChild(n?t:document.createTextNode(String(t)))})),this.appendChild(e)}[Element.prototype,Document.prototype,DocumentFragment.prototype].forEach((function(e){e.hasOwnProperty("append")||Object.defineProperty(e,"append",{configurable:!0,enumerable:!0,writable:!0,value:t})}))}()},643:function(t){var e="complete",n="canceled";function o(t,e,n){Math.max(0,e),Math.max(0,n),t.self===t?t.scrollTo(e,n):(t.scrollLeft=e,t.scrollTop=n)}function i(t){var n=t._scrollSettings;if(n){var s=n.maxSynchronousAlignments,r=function(t,e){var n,o,i,s,r,a,l,c=t.align,d=t.target.getBoundingClientRect(),u=c&&null!=c.left?c.left:.5,h=c&&null!=c.top?c.top:.5,p=c&&null!=c.leftOffset?c.leftOffset:0,f=c&&null!=c.topOffset?c.topOffset:0,m=u,v=h;if(t.isWindow(e))a=Math.min(d.width,e.innerWidth),l=Math.min(d.height,e.innerHe
1ight),o=d.left+e.pageXOffset-e.innerWidth*m+a*m,i=d.top+e.pageYOffset-e.innerHeight*v+l*v,o-=p,i-=f,o=t.align.lockX?e.pageXOffset:o,i=t.align.lockY?e.pageYOffset:i,s=o-e.pageXOffset,r=i-e.pageYOffset;else{a=d.width,l=d.height,n=e.getBoundingClientRect();var w=d.left-(n.left-e.scrollLeft),g=d.top-(n.top-e.scrollTop);o=w+a*m-e.clientWidth*m,i=g+l*v-e.clientHeight*v,o-=p,i-=f,o=Math.max(Math.min(o,e.scrollWidth-e.clientWidth),0),i=Math.max(Math.min(i,e.scrollHeight-e.clientHeight),0),o=t.align.lockX?e.scrollLeft:o,i=t.align.lockY?e.scrollTop:i,s=o-e.scrollLeft,r=i-e.scrollTop}return{x:o,y:i,differenceX:s,differenceY:r}}(n,t),a=Date.now()-n.startTime,l=Math.min(1/n.time*a,1);if(n.endIterations>=s)return o(t,r.x,r.y),t._scrollSettings=null,n.end(e);var c=1-n.ease(l);if(o(t,r.x-r.differenceX*c,r.y-r.differenceY*c),a>=n.time)return n.endIterations++,n.scrollAncestor&&i(n.scrollAncestor),void i(t);!function(t){if("requestAnimationFrame"in window)return window.requestAnimationFrame(t);setTimeout(t,16)}(i.bind(null,t))}}function s(t){return t.self===t}function r(t){return"pageXOffset"in t||(t.scrollHeight!==t.clientHeight||t.scrollWidth!==t.clientWidth)&&"hidden"!==getComputedStyle(t).overflow}function a(){return!0}function l(t){if(t.assignedSlot)return l(t.assignedSlot);if(t.parentElement)return"BODY"===t.parentElement.tagName?t.parentElement.ownerDocument.defaultView||t.parentElement.ownerDocument.ownerWindow:t.parentElement;if(t.getRootNode){var e=t.getRootNode();if(11===e.nodeType)return e.host}}t.exports=function(t,o,c){if(t){"function"==typeof o&&(c=o,o=null),o||(o={}),o.time=isNaN(o.time)?1e3:o.time,o.ease=o.ease||function(t){return 1-Math.pow(1-t,t/2)},o.align=o.align||{};var d=l(t),u=1,h=o.validTarget||a,p=o.isScrollable;o.debug;for(var f=[];d;)if(o.debug,h(d,u)&&(p?p(d,r):r(d))&&(u++,f.push(d)),!(d=l(d))){m(e);break}return f.reduce(((e,r,a)=>function(t,e,o,r,a){var l,c=!e._scrollSettings,d=e._scrollSettings,u=Date.now(),h={passive:!0};function p(t){e._scrollSettings=null,e.parentElement&&e.parentElement._scrollSettings&&e.parentElement._scrollSettings.end(t),o.debug,a(t),l&&(e.removeEventListener("touchstart",l,h),e.removeEventListener("wheel",l,h))}d&&d.end(n);var f=o.maxSynchronousAlignments;return null==f&&(f=3),e._scrollSettings={startTime:u,endIterations:0,target:t,time:o.time,ease:o.ease,align:o.align,isWindow:o.isWindow||s,maxSynchronousAlignments:f,end:p,scrollAncestor:r},"cancellable"in o&&!o.cancellable||(l=p.bind(null,n),e.addEventListener("touchstart",l,h),e.addEventListener("wheel",l,h)),c&&i(e),l}(t,r,o,f[a+1],m)),null)}function m(t){--u||c&&c(t)}}},4942:function(t,e,n){"use strict";function o(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}n.d(e,{Z:function(){return o}})}},e={};function n(o){var i=e[o];if(void 0!==i)return i.exports;var s=e[o]={exports:{}};return t[o](s,s.exports,n),s.exports}n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,{a:e}),e},n.d=function(t,e){for(var o in e)n.o(e,o)&&!n.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:e[o]})},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},function(){"use strict";var t=n(4942),e=n(6295).default;function o({wrapper_class:t=""}){return e("div",{style:{"--tw-bg-opacity":"0.3"},className:`sf-modal sf-modal__wrapper fixed inset-0 px-5 bg-black flex items-center justify-center transition-opacity opacity-0 duration-200 ease-out ${t}`},e("button",{className:"lg:hidden sf-modal__close text-black absolute p-2 bg-white hover:bg-gray-300 rounded-full z-10"},e("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M6 18L18 6M6 6l12 12"}))),e("div",{className:"sf-modal__content bg-white relative rounded max-h-[90vh]"},e("button",{className:"hidden lg:block sf-modal__close text-black absolute p-2 bg-white hover:bg-gray-300 rounded-full z-10"},e("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M6 18L18 6M6 6l12 12"}))),e("div",{className:"sf-modal__content-inner"})))}
1const i=({context:t=document.documentElement,event:e="click",selector:n,handler:o,capture:i=!1})=>{const s=function(t){for(let e=t.target;e&&e!==this;e=e.parentNode)if(e.matches(n)){o.call(e,t,e);break}};return t.addEventListener(e,s,i),()=>{t.removeEventListener(e,s,i)}};var s=n(6295).default;var r=class{constructor(e){var n,r;(0,t.Z)(this,"init",(()=>{i({selector:".sf-modal__wrapper",handler:t=>{var e;((null==t?void 0:t.target)===this.modal||null!=t&&null!==(e=t.target)&&void 0!==e&&e.closest(".sf-modal__close"))&&this.close(t)}})})),(0,t.Z)(this,"setSizes",((t="")=>{this.resetSize(),this.sizes=t,t.split(" ").forEach((t=>{var e,n;null===(e=this.modalContent)||void 0===e||null===(n=e.classList)||void 0===n||n.add(t)}))})),(0,t.Z)(this,"setWidth",(t=>{this.modalContent.style.width=t})),(0,t.Z)(this,"resetSize",(()=>{this.sizes&&(this.sizes.split(" ").forEach((t=>{var e,n;null===(e=this.modalContent)||void 0===e||null===(n=e.classList)||void 0===n||n.remove(t)})),this.sizes="")})),(0,t.Z)(this,"appendChild",(t=>{var e;null==this||null===(e=this.modalContentInner)||void 0===e||e.appendChild(t),this.children=t})),(0,t.Z)(this,"removeChild",(()=>{var t;null==this||null===(t=this.children)||void 0===t||t.remove()})),(0,t.Z)(this,"open",(()=>{document.documentElement.classList.add("prevent-scroll"),document.body.appendChild(this.modal),setTimeout((()=>this.modal.classList.add("opacity-100"))),window.addEventListener("keydown",this.handleKeyDown)})),(0,t.Z)(this,"close",(t=>{null==t||t.preventDefault(),this.modal.classList.remove("opacity-100"),window.removeEventListener("keydown",this.handleKeyDown),setTimeout((()=>{this.modal.remove(),this.removeChild(),this.resetSize(),this.modalContent.style.removeProperty("width"),document.documentElement.classList.remove("prevent-scroll")}),this.transitionDuration)})),(0,t.Z)(this,"handleKeyDown",(t=>{27===t.keyCode&&this.close()})),this.modal=s(o,{wrapper_class:e||void 0}),this.modalContent=null===(n=this.modal)||void 0===n?void 0:n.querySelector(".sf-modal__content"),this.modalContentInner=null===(r=this.modal)||void 0===r?void 0:r.querySelector(".sf-modal__content-inner"),this.transitionDuration=200,this.init()}};n(643);const{themeScriptURLs:a,themeStyleURLs:l}=window,c={js:{urls:a,load:function(t,e=document.body,n=!0,o=!1){return new Promise(((i,s)=>{const r=e.ownerDocument,a=r.querySelector(`script[src="${t}"]`);if(a)return a.dataset.loaded?i(!0):void a.addEventListener("load",(()=>{a.dataset.loaded=!0,i(!0)}));const l=r.createElement("script");l.src=t,l.async=n,l.defer=o,l.addEventListener("load",(()=>{l.dataset.loaded=!0,i(!0)})),l.onerror=s,e.appendChild(l)}))}},css:{urls:l,load:function(t,e=document.head){return new Promise(((n,o)=>{const i=e.ownerDocument,s=i.querySelector(`link[href="${t}"]`);if(s)return s.dataset.loaded?n(!0):void s.addEventListener("load",(()=>{s.dataset.loaded=!0,n(!0)}));const r=i.createElement("link");r.rel="stylesheet",r.href=t,r.addEventListener("load",(()=>{r.dataset.loaded=!0,n(!0)})),r.onerror=o,e.appendChild(r)}))}}};function d(t){return new Promise(((e,n)=>{const o="string"==typeof t?[t]:t;Promise.all(o.map((async t=>{try{const[,e,n]=t.match(/(.*)\.(js|css)$/)||[,t,"js"],{urls:{[e]:{url:o}},load:i}=c[n];await i(o)}catch(t){}}))).then(e).catch(n)}))}n(6295).default;function u(t={},e=document){return Object.entries(t).reduce(((t,[n,o])=>{var i;const s="string"==typeof o,r=s?"querySelector":"querySelectorAll",a=s?o:o[0];return t[n]=null==e||null===(i=e[r])||void 0===i?void 0:i.call(e,a),!s&&t[n]&&(t[n]=[...t[n]]),t}),{})}window.__getSectionInstanceByType=t=>window.Shopify.theme.sections.instances.find((e=>e.type===t));document.querySelector("#scroll-to-top-target");function h(t){for(var e=t+"=",n=decodeURIComponent(document.cookie).split(";"),o=0;o<n.length;o++){for(var i=n[o];" "===i.charAt(0);)i=i.substring(1);if(0===i.indexOf(e))return i.substring(e.length,i.length)}return""}var p=n(6295).default;var f=class{constructor(e,n,o="Size guide"){(0,t.Z)(this,"selectors",{openBtn:"[data-open-sizeguide]"}),(0,t.Z)(this,"init",((t,e)=>{var n,o;const s=document.querySelector(".product-template");null===(n=this.domNodes.openBtn)||void 0===n||null===(o=n.classList)||void 0===o||o.remove("hidden"),document.querySelectorAll(this.selectors.openBtn).forEac
1h((t=>{t.querySelector("span").innerText=e}));const a=p("div",null);a.classList.add("rte","prose","size-chart-content"),a.innerHTML=t,this.modal=new r,i({selector:this.selectors.openBtn,handler:e=>{e.preventDefault(),t&&(this.modal.appendChild(a),this.modal.setSizes("bg-white size-chart"),this.modal.open())}}),s.classList.add("size-chart-initialized")})),this.domNodes=u(this.selectors),this.init(n,o)}};function m(t,e){"string"==typeof t&&(t=t.replace(".",""));let n="";const o=/\{\{\s*(\w+)\s*\}\}/,i=e||"${{amount}}";function s(t,e=2,n=",",o="."){if(isNaN(t)||null==t)return 0;const i=(t=(t/100).toFixed(e)).split(".");return i[0].replace(/(\d)(?=(\d\d\d)+(?!\d))/g,`$1${n}`)+(i[1]?o+i[1]:"")}switch(i.match(o)[1]){case"amount":n=s(t,2);break;case"amount_no_decimals":n=s(t,0);break;case"amount_with_comma_separator":n=s(t,2,".",",");break;case"amount_no_decimals_with_comma_separator":n=s(t,0,".",",")}return i.replace(o,n)}var v=n(6295).default,w=n(7345).default;function g({settings:t}){var e,n;const{discount:o,eta:i,show_eta:s,active_discount:r}=t,{money_format:a}=window.spratlyThemeSettings,l=Number((null===(e=window.Shopify)||void 0===e||null===(n=e.currency)||void 0===n?void 0:n.rate)||1),c="PERCENTAGE"===o.type?`${o.value}%`:m(100*o.value*l,a),d=v("li",null),u=v("li",null);return d.innerHTML=w.tr("preorder_discount_title",{discount_value:c}),u.innerHTML=w.tr("preorder_shipping_note",{eta:new Date(i).toLocaleDateString()}),v("ul",{className:"foxkit-preorder-note"},r&&null!=o&&o.value?d:null,s&&i?u:null)}n(6295).default;new Map,new Map,new Map;n(6295).default,n(7345).default;String.prototype.capitalize||(String.prototype.capitalize=function(){var t,e;return this.replace(this[0],null===(t=this[0])||void 0===t||null===(e=t.toUpperCase)||void 0===e?void 0:e.call(t))});var _=n(7345).default,y=n(6295).default;class b{constructor(){(0,t.Z)(this,"appURL",window.spratlyThemeSettings.foxkitAppURL?`https://${window.spratlyThemeSettings.foxkitAppURL}`:""),(0,t.Z)(this,"shop",window.Shopify.shop),(0,t.Z)(this,"page",window.spratlyThemeSettings.template),(0,t.Z)(this,"template",window.spratlyThemeSettings.templateName),(0,t.Z)(this,"foxKitSettings",{}),(0,t.Z)(this,"discountCodeKey","mn-discount-code"),(0,t.Z)(this,"selectors",{bundleContainerOutside:"#fox-product-bundle-out
1side",bundleContainerInsideDesktop:".sf-prod-template__desktop #fox-product-bundle-inside",bundleContainerInsideMobile:".sf-prod-template__mobile #fox-product-bundle-inside",formActions:"[data-cart-actions]"}),(0,t.Z)(this,"cartSelectors",{checkoutButton:'[name="checkout"]',cartDiscountsWrapper:"[data-discounts-wrapper]",cartDiscounts:"[data-discounts]",cartDiscountsList:"[data-discounts-list]",subTotalPrice:"[data-cart-subtotal-price]",cartItem:".scd-item",cartItemPrices:".scd-item__prices",cartItemOriginalPrice:"[data-cart-item-original-price]",cartItemFinalPrice:"[data-cart-item-final-price]",couponMessages:"#coupon-messages",cartDiscountCode:'[name="discount"]',discountNoti:"[data-discount-noti]"}),(0,t.Z)(this,"newCart",null),(0,t.Z)(this,"lastDiscount",void 0),(0,t.Z)(this,"showNoti",!1),(0,t.Z)(this,"checkoutEventAdded",!1),(0,t.Z)(this,"init",(async()=>{var t,e,n;this.domNodes=u(this.selectors),await d("foxkitApp.css");const o=await this.fetchShopLocales();if(o&&o.ok&&o.payload){const{locale:t,data:e}=o.payload;_.setLocales(t,e)}const i=await this.fetchData();null!=i&&i.ok&&null!=i&&i.payload&&(this.foxKitSettings={...i.payload,inCart:{active:!0},prePurchase:{active:!0}},Object.entries(this.foxKitSettings).forEach((([t,e])=>{let n=(null==e?void 0:e.active)||!1;if(["popup","luckyWheel"].includes(t)&&n&&(window.innerWidth<767&&(n=e.show_on_mobile),n&&"home_only"===e.display_on&&"index"!==this.page&&(n=!1)),"bis"===t&&"product"!==this.template&&n&&(n=!1),n){const e=`init${t.capitalize()}`;d(t).then(this[e])}}))),this.renderPreOrderNote(),await this.renderNewCart(null===(t=window.spratlyTheme)||void 0===t||null===(e=t.Cart)||void 0===e?void 0:e.cart),null===(n=window._ThemeEvent)||void 0===n||n.subscribe("ON_CART_UPDATE",this.renderNewCart)})),(0,t.Z)(this,"handleCheckout",(t=>{var e,n,o;t.preventDefault(),t.stopPropagation();const i=t.target,s=this.generateFoxkitCart(null===(e=window.spratlyTheme)||void 0===e||null===(n=e.Cart)||void 0===n?void 0:n.cart),r=(null===(o=window.spratlyThemeSettings.shop_locale)||void 0===o?void 0:o.current)||"en";fetch(`${this.appURL}/api/public/checkout?shop=${this.shop}`,{method:"POST",body:JSON.stringify(s)}).then((t=>t.json())).then((t=>{const{invoiceUrl:e}=(null==t?void 0:t.payload)||{};e?window.location.href=`${e}?locale=${r}`:(this.toogleCheckoutEvent(0),i.click())})).catch((t=>{this.toogleCheckoutEvent(0),i.click()}))})),(0,t.Z)(this,"fetchShopLocales",(()=>new Promise(((t,e)=>{var n,o;const i=(null===(n=window.spratlyThemeSettings)||void 0===n||null===(o=n.shop_locale)||void 0===o?void 0:o.current)||"en";fetch(`${this.appURL}/api/public/locale?shop=${this.shop}&locale=${i}`).then((t=>t.json())).then(t).catch(e)})))),(0,t.Z)(this,"fetchData",(()=>new Promise(((t,e)=>{const n=document.body.dataset.productId;let o=`${this.appURL}/api/public/?shop=${this.shop}`;n&&(o+=`&productId=${n}`),fetch(o).then((t=>t.json())).then(t).catch(e)})))),(0,t.Z)(this,"initBis",(()=>{const{bis:t}=this.foxKitSettings;this.BIS=new window.FoxKit.BIS(t)})),(0,t.Z)(this,"initProductRecommendations",(()=>{const{productRecommendations:t}=this.foxKitSettings,{recommended_products:e,heading:n="Recommend for you"}=t,o=window.spratlyTheme.ProductRecommendation,i=document.querySelector('[data-section-type="foxkit-related-products"]');if(Array.isArray(e)&&e.length&&o&&i){const t=i.querySelector(".sf-product__section-heading"),{productTitle:s,productVendor:r,productType:a}=i.dataset;t.textContent=n.replace("{product_title}",s).replace("{product_vendor}",a).replace("{product_type}",r),this.RelatedProducts=new o(i,e)}})),(0,t.Z)(this,"initBundle",(()=>{var t;const e=null===(t=window.spratlyTheme)||void 0===t?void 0:t.ProductBundle;if(e){const{bundle:t}=this.foxKitSettings,{bundleContainerOutside:n,bundleContainerInsideMobile:o,bundleContainerInsideDesktop:i}=this.domNodes;"inside"===t.position?this.Bundle={desktop:new e(i,t),mobile:new e(o,t)}:this.Bundle=new e(n,t)}})),(0,t.Z)(this,"initPopup",(()=>{const{popup:t}=this.foxKitSettings;this.Popup=new window.FoxKit.Popup(t)})),(0,t.Z)(this,"initLuckyWheel",(()=>{const{luckyWheel:t}=this.foxKitSettings;this.LuckyWheel=new window.FoxKit.LuckyWheel(t)})),(0,t.Z)(this,"initSizeChart",(()=>{const{sizeChart:t}=this.foxKitSettings;this.SizeChart=new f(this.sizeChartEnabled,null==t?void 0:t.chart_content,_.tr("sizechart_button"))})),(0,t.Z)(this,"initSalesNotification",(()=>{const{salesNotification:t}
1=this.foxKitSettings,e={title:t.title,time:t.time,hideOnMobile:!t.show_on_mobile,duration:parseInt(t.display_time)||5,delay:t.delay_time||"10-15",showAfter:t.delay_show||5,maximum:parseInt(t.max_show),products:null==t?void 0:t.products,names:t.names.split(", "),locations:t.locations.split(", ")};this.SalesPop=new window.FoxKit.SalesNotifications(e)})),(0,t.Z)(this,"initCountdown",(()=>{const{countdown:t}=this.foxKitSettings;this.Countdown=new window.spratlyTheme.ProductCountdown(t)})),(0,t.Z)(this,"initStockCountdown",(()=>{})),(0,t.Z)(this,"initPrePurchase",(()=>{const{prePurchase:t}=this.foxKitSettings;this.PrePurchase=new window.FoxKit.PrePurchase(t)})),(0,t.Z)(this,"initCartGoal",(()=>{const{cartGoal:t}=this.foxKitSettings;this.CartGoal=new window.FoxKit.CartGoal(t)})),(0,t.Z)(this,"initInCart",(()=>{this.InCart=new window.FoxKit.InCart})),(0,t.Z)(this,"initQuantityDiscount",(()=>{const{quantityDiscount:t}=this.foxKitSettings;this.QuantityDiscount=new window.FoxKit.QuantityDiscount(t)})),(0,t.Z)(this,"initPreOrder",(()=>{const{preOrder:t}=this.foxKitSettings;t&&t.active&&this.domNodes.formActions.appendChild(y(g,{settings:t}))})),(0,t.Z)(this,"renderPreOrderNote",(()=>{const t={sections:['[data-preorder="true"]'],formActions:"[data-cart-actions]"},e=u(t);e.sections.length&&e.sections.forEach((e=>{const n={discount:{value:e.dataset.preorderDiscount,type:e.dataset.preorderDiscountType},eta:e.dataset.preorderEta,show_eta:"true"===e.dataset.preorderShowEta,active_discount:"true"===e.dataset.preorderDiscountActive};e.querySelector(t.formActions).appendChild(y(g,{settings:n}))}))})),(0,t.Z)(this,"getNewCart",(async t=>new Promise(((e,n)=>{var o,i;const s=this.generateFoxkitCart(t);if(!s)return e();const r="discount_code"===(null===(o=this.foxKitSettings)||void 0===o||null===(i=o.shop)||void 0===i?void 0:i.discount_apply_by)?"/v2":"",a=`${this.appURL}/api/public${r}/cart/?shop=${this.shop}`;fetch(a,{method:"POST",body:JSON.stringify(s)}).then((t=>t.json())).then(e).catch(n)})))),(0,t.Z)(this,"generateFoxkitCart",(t=>{var e,n,o,i,s;if(!t||null==t||null===(e=t.items)||void 0===e||!e.length)return!1;const{attributes:r}=t;let{_foxCartDiscounts:a=[]}=r,l={...t};null!==(n=a)&&void 0!==n&&n.length&&(a=JSON.parse(a).map((t=>JSON.parse(t))));const{cartGoal:c}=this.foxKitSettings;if(c&&this.CartGoal){const{active:t,disable_foxkit_discount:e}=c;t&&!e&&this.CartGoal.goalDone&&this.CartGoal.enabled&&a.push({offer_id:c._id,plugin:"CartGoal"})}l.attributes={...r,_foxCartDiscounts:[...a]};const d=h("discount_code");return d&&(l.discount_code=d),l._foxCurrency={...(null===(o=window.Shopify)||void 0===o?void 0:o.currency)||{},published:null===(i=this.foxKitSettings)||void 0===i||null===(s=i.shop)||void 0===s?void 0:s.currency},l})),(0,t.Z)(this,"renderNewCart",(t=>{t&&t.item_count&&this.getNewCart(t).then((({payload:t})=>{this.cartNodes=u(this.cartSelectors);const{Shopify:e,spratlyTheme:n,spratlyThemeSettings:o,_ThemeEvent:i}=window;let s=!1;if(t){var r,a;this.newCart=t,i.emit("ON_FOX_CART_UPDATE",t);const{_foxCartPrices:u}=t;let h=!(null==u||!u.total_discounted_amount);if("discount_code"!==(null===(r=this.foxKitSettings.shop)||void 0===r?void 0:r.discount_apply_by)){const t=this.foxKitSettings.cartGoal;if(null!=t&&t.active&&t.goal_amount){var l,c,d;const o=Number(t.goal_amount||0)*Number((null==e||null===(l=e.currency)||void 0===l?void 0:l.rate)||1)*100;((null==n||null===(c=n.Cart)||void 0===c||null===(d=c.cart)||void 0===d?void 0:d.total_price)||0)>=o&&(h=!0)}}if(this.toogleCheckoutEvent(h),this.applyDiscount(null==u?void 0:u.discount),null===(a=this.lastDiscount)||void 0===a||a.remove(),u){s=!0;const{cartDiscounts:t,subTotalPrice:e,cartDiscountsWrapper:n}=this.cartNodes,{total_discounted_amount:i,total_price:r}=u,a=this.generateCartDiscount(i);null==t||t.appendChild(a),this.lastDiscount=a;const{money_format:l}=o;e&&setTimeout((()=>e.innerHTML=m(r,l)),200),null==n||n.classList.remove("hidden")}}if(this.cartNodes.couponMessages){let e=_.tr("discount_noti");if(s){e=_.tr("fox_discount_noti",{price:m(t._foxCartPrices.total_discounted_amount,o.money_format),discount_title:_.tr("discount_title")});const{discountNoti:n,cartDiscountCode:i}
1=this.cartNodes;if(!this.showNoti){const t=localStorage.getItem(this.discountCodeKey);i&&t&&(n.style.display="inline",this.showNoti=!0)}}this.cartNodes.couponMessages.firstElementChild.innerHTML=e}})).catch(console.error)})),(0,t.Z)(this,"toogleCheckoutEvent",(t=>{var e,n;const{checkoutButton:o}=this.cartNodes,i="discount_code"!==(null===(e=this.foxKitSettings)||void 0===e||null===(n=e.shop)||void 0===n?void 0:n.discount_apply_by);o&&i&&(t?this.checkoutEventAdded||(o.addEventListener("click",this.handleCheckout,!0),this.checkoutEventAdded=!0):(o.removeEventListener("click",this.handleCheckout,!0),this.checkoutEventAdded=!1))})),(0,t.Z)(this,"applyDiscount",(t=>{if(!t)return;const{codeDiscount:e,shareable_url:n,code:o,summary:i}=t;if("ACTIVE"===(null==e?void 0:e.status)&&n){h("discount_code")!==o&&fetch(n).then((()=>{})).catch(console.error)}})),(0,t.Z)(this,"generateCartDiscount",(t=>{var e,n;const o=y("ul",null);o.classList.add("scd-cart__discounts"),t=m(t,null===(e=window)||void 0===e||null===(n=e.spratlyThemeSettings)||void 0===n?void 0:n.money_format);const i=y("li",null);return i.innerHTML=`<svg aria-hidden="true" width="20" height="20" focusable="false" role="presentation" viewBox="0 0 12 13"><path fill-rule="evenodd" clip-rule="evenodd" d="M7 .5h3a2 2 0 0 1 2 2v3a.995.995 0 0 1-.293.707l-6 6a1 1 0 0 1-1.414 0l-4-4a1 1 0 0 1 0-1.414l6-6A.995.995 0 0 1 7 .5zm2 2a1 1 0 1 0 2 0 1 1 0 0 0-2 0z" fill="currentColor"></path></svg> ${_.tr("discount_title")} (-${t})`,o.appendChild(i),o}));const{appURL:e,shop:n}=this;e&&n&&this.init().catch(console.error)}}window.FoxKit=new b}()}();

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.