(()=>{(()=>{var Y={72087(s,f,i){"use strict";i.r(f),i.d(f,{getCookie:()=>w,setCookie:()=>O});function w(S){let d=S+"=",u=decodeURIComponent(document.cookie).split(";");for(let a=0;a<u.length;a++){let n=u[a].trim();if(n.indexOf(d)==0)return n.substring(d.length,n.length)}return null}function O(S,d,m){m=m||{};let u=m.domain,a=m.expiresIn||31*1e3*3600*24,n=m.path||"/";const e=new Date;e.setTime(e.getTime()+a);let p="; expires="+e.toUTCString(),I=u!=null?"; domain="+u:"",E=n!=null?"; path="+n:"";document.cookie=S+"="+d+p+E+I}},98612(s,f,i){"use strict";i.d(f,{v:()=>w});function w(){try{const S=(new Error().stack||"").match(/https?:\/\/[^\s)'"`]+\/widgets\/[^\s)'"`]+/);return S?S[0].replace(/:\d+(?::\d+)?$/,""):null}catch{return null}}},25187(s){function f(){return new URLSearchParams(window.location.search).get("profiling")==="1"}s.exports.start=function(i){f()&&performance.mark(`${i}-start`)},s.exports.end=function(i){if(f())try{performance.mark(`${i}-end`);const w=performance.measure(i,`${i}-start`,`${i}-end`);console.log(`Profiling result (${i}):`,w)}catch(w){console.log("Error profiling",w)}}},20741(s,f,i){"use strict";i.r(f),i.d(f,{isHtmlScriptElement:()=>d,resolveEmbedScript:()=>u});var w=i(98612);const O="script.snapppt-widget, script.snptwdgt_init_prldr";function S(){return!0}function d(a){return typeof(a==null?void 0:a.tagName)=="string"&&a.tagName.toUpperCase()==="SCRIPT"}function m(a,n){return!!n&&!!a&&[a._snptResolvedSrc,a.src,a.getAttribute&&a.getAttribute("src"),a.getAttribute&&a.getAttribute("data-src")].includes(n)}function u(a,n){a=a||window,n=n||{};const e=n.preferGlobal!==!1,p=n.isEligible||S,I=a.document,E=h=>d(h)&&p(h),r=(e?[a.CURRENT_SNPT_SCRIPT,I&&I.currentScript]:[I&&I.currentScript,a.CURRENT_SNPT_SCRIPT]).find(E);if(r)return r;let o=null;try{o=(0,w.v)()}catch{}const y=I?I.querySelectorAll(O):[];if(o){for(let h=0;h<y.length;h++)if(E(y[h])&&m(y[h],o))return y[h]}for(let h=y.length-1;h>=0;h--)if(E(y[h]))return y[h];return null}},22914(s,f,i){"use strict";i.r(f),i.d(f,{getAPIServerEndpoint:()=>I,getServerEndpoint:()=>p,isTrustedWidgetHost:()=>m,isTrustedWidgetSrc:()=>a,parseTrustedWidgetUrl:()=>u,pickTrustedScriptSrc:()=>e,resolveTrustedApiEndpoint:()=>T,warnRejectedWidgetSource:()=>n});var w=i(98612);const O=["addsauce.com","recomelon.com","snapppt.com"],S=["addsauce.test","melon.test","addsauce.ci","melon.ci"];function d(r,o){for(let y=0;y<o.length;y++){const h=o[y];if(r===h||r.endsWith("."+h))return!0}return!1}function m(r){if(!r||typeof r!="string")return!1;const o=r.toLowerCase();return d(o,O)||d(o,S)}function u(r){if(!r||typeof r!="string")return null;let o;try{o=new URL(r)}catch{return null}if(o.username||o.password||o.protocol!=="https:"&&o.protocol!=="http:")return null;const y=String(o.hostname||"").toLowerCase();return!m(y)||o.protocol==="http:"&&!d(y,S)?null:o}function a(r){return u(r)!=null}function n(r){try{console.warn("[Sauce] "+r+": untrusted widget script source, aborting.")}catch{}}function e(r,o){const y=[r&&r.src,r&&r.getAttribute&&r.getAttribute("src"),r&&r.getAttribute&&r.getAttribute("data-src"),r&&r._snptResolvedSrc];let h=!1;for(let b=0;b<y.length;b++)if(y[b]&&(h=!0,a(y[b])))return y[b];if(h)return"";const L=o&&o.win||(typeof window!="undefined"?window:null),l=[(0,w.v)(),L&&L.CURRENT_SNPT_EMBED];for(let b=0;b<l.length;b++)if(a(l[b]))return l[b];return""}function p(r){const o=u(r);return o?d(o.hostname,["snapppt.com"])?`${o.protocol}//app.addsauce.com`:o.origin:""}function I(r){const o=p(r);return o?o.includes(".melon.")||o.includes("recomelon.com")?o:o.replace("app.","client."):""}function E(r){if(!r||typeof r!="string")return"";let o=r.trim();return!o||(/^https?:\/\//i.test(o)||(o=`https://${o}`),!a(o))?"":o.replace(/\/$/,"")}function T(r,o){const y=I(r);if(!y)return"";let h="";try{const L=o&&o.win||window;h=new URLSearchParams(L.location.search).get("__addsauce_items_api_endpoint")||""}catch{h=""}return E(h)||y}},11581(s,f,i){const w=i(72087),O="snpt-tracking-v2-session",S="snpt_sess",d=744*60*60*1e3,m="snpt_visit",u=14400*1e3,a={};function n(){return window.location.search.includes("tracking=true")?!1:window.location.hostname==="app.addsauce.com"||window.location.hostname==="app.addsauce.test"}function e(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(L){var l=Math.random()*16|0,b=L==="x"?l:l&3|8;return b.toString(16)})}function p(){return typeof crypto.randomUUID=="function"?crypto.randomUUID():e()}async function I(L,l){if(l==null&&(l=window.location.hostname),l==="")return null;if(a[l])return a[l];try{let N=localStorage.getItem(`root_domain[${l}]`);if(N)return N}catch(N){console.log("Unable to get cached root domain",N)}let b=new AbortController,P=5*1e3,U=setTimeout(()=>b.abort(),P);try{let N=`${L}/root_domain?hostname=${encodeURIComponent(l)}`,j=await fetch(N,{signal:b.signal});clearTimeout(U);let M=(await j.json()).root_domain;if(M!=null){a[l]=M;try{localStorage.setItem(`root_domain[${l}]`,M)}catch(W){console.log("Unable to set cached root domain",W)}}return M}catch(N){return clearTimeout(U),console.error("Error getting root domain",N),l}}class E{constructor(l,b){this.cookieKey=l,this.cookieExpiresIn=b}getCookie(){return w.getCookie(this.cookieKey)}async setCookie(l,b,P){P={expiresIn:this.cookieExpiresIn,...P||{}};let U=await I(l,window.location.hostname);return U!=null&&(P.domain="."+U),w.setCookie(this.cookieKey,b,P)}async getOrCreate(l){if(n())return null;let b=this.getCookie();return(b==null||b==="")&&(b=p()),await this.setCookie(l,b),b}}class T extends E{constructor(){super(m,u)}}class r extends E{constructor(){super(S,d)}}class o extends E{constructor(){super(O,d)}}function y(){let L=new r().getCookie();if(L!=null&&L!=="")return L;let l=new o().getCookie();return l!=null&&l!==""?l:null}class h{static getCurrentSessionID(){return y()}static getCurrentVisitID(){return new T().getCookie()}static isShopifyWebPixelAvailable(){try{return typeof window!="undefined"&&window.Shopify!=null&&window.Shopify.analytics!=null}catch{return!1}}constructor(l){this.apiEndpoint=l}getCurrentSessionIDIfPresent(){return n()?null:y()}getCurrentVisitIDIfPresent(){if(n())return null;let l=new T().getCookie();return l!=null&&l!==""?l:null}async getOrCreateCurrentSessionID(){if(h.isShopifyWebPixelAvailable())return this.getCurrentSessionIDIfPresent();let l=new o().getCookie();return l!=null&&l!==""&&await new r().setCookie(this.apiEndpoint,l),await new r().getOrCreate(this.apiEndpoint)}async getOrCreateCurrentVisitID(){return h.isShopifyWebPixelAvailable()?this.getCurrentVisitIDIfPresent():await new T().getOrCreate(this.apiEndpoint)}}s.exports=h},36437(s,f,i){"use strict";i.d(f,{IC:()=>S,Ki:()=>O,O5:()=>w,at:()=>d});const w=m=>(m||"").includes(".melon.")||(m||"").includes("recomelon.com"),O=m=>{const u={uid:null,type:null,name:null};try{if(!m)return u;const a=decodeURI(new URL(m).pathname),n=[];w(m)?n.push({regex:/widgets\/([^/]+)\/([^/]+)\/([^/]+)\/index\.js$/,uid:1,type:e=>e[2],name:e=>e[3]}):n.push({regex:/widgets\/picture-card\/(.*)/,uid:1,type:"picture_card",name:null},{regex:/widgets\/loop_clips\/([^\/]+)\/([\w\-]+)\.js$/,uid:1,type:"loop_clips",name:2},{regex:/widgets\/highlight_reels\/([^\/]+)\/([\w\-]+)\.js$/,uid:1,type:"highlight_reels",name:2},{regex:/widgets\/tv\/([^\/]+)\/([\w\-]+)\.js$/,uid:1,type:"sauce_tv_gallery",name:2},{regex:/widgets\/product_page_highlight_reels\/([^\/]+)\/index\.js/,uid:1,type:"product_page_highlight_reels",name:"product_page_highlight_reels"},{regex:/widgets\/ppg\/([^\/]+)/,uid:1,type:"product_page_gallery",name:null},{regex:/widgets\/upsell\/([^\/]+)\/([\w\-]+)\.js$/,uid:1,type:"upsell_gallery",name:e=>e[2]||"_product_page_upsell_gallery"},{regex:/widgets\/basket_upsell\/([^\/]+)\/([\w\-]+)\.js$/,uid:1,type:"basket_upsell_gallery",name:e=>e[2]||"_basket_upsell_gallery"},{regex:/widgets\/upsell_similar\/([^\/]+)\/([\w\-]+)\.js$/,uid:1,type:"upsell_similar_gallery",name:e=>e[2]||"_product_page_upsell_similar_gallery"},{regex:/widgets\/liveig\/([^\/]+)/,uid:1,type:"live_ig_feed",name:null},{regex:/widgets\/shop_minis_store_page_gallery\/([^\/]+)/,uid:1,type:"shop_minis_store_page_gallery",name:null},{regex:/loader[^\/]*\/([^\/]+)\/([\w\- ]+)\.js$/,uid:1,type:"shoppable",name:e=>e[2].replace(" ","-")});for(const e of n){const p=a.match(e.regex);p&&(u.uid=typeof e.uid=="number"?p[e.uid]:null,u.type=typeof e.type=="function"?e.type(p):e.type,u.name=typeof e.name=="function"?e.name(p):typeof e.name=="number"?p[e.name]:e.name)}}catch{}return u},S=["loop_clips","highlight_reels","picture_card","live_ig_feed","sauce_tv_gallery","upsell_gallery","basket_upsell_gallery","upsell_similar_gallery","product_page_gallery","product_page_highlight_reels"],d=m=>m&&(m._snptResolvedSrc||m.src||m.getAttribute("src")||m.getAttribute("data-src"))||""}},B={};function _(s){var f=B[s];if(f!==void 0)return f.exports;var i=B[s]={exports:{}};return Y[s](i,i.exports,_),i.exports}_.m=Y,_.n=s=>{var f=s&&s.__esModule?()=>s.default:()=>s;return _.d(f,{a:f}),f},_.d=(s,f)=>{for(var i in f)_.o(f,i)&&!_.o(s,i)&&Object.defineProperty(s,i,{enumerable:!0,get:f[i]})},_.f={},_.e=s=>Promise.all(Object.keys(_.f).reduce((f,i)=>(_.f[i](s,f),f),[])),_.u=s=>""+{3925:"preloader-prefetch-symphony",6939:"preloader-prefetch-legacy"}[s]+"-"+{3925:"fc196808",6939:"1a83f9bc"}[s]+"-chunk.js",_.o=(s,f)=>Object.prototype.hasOwnProperty.call(s,f),(()=>{var s={},f="snpt:";_.l=(i,w,O,S)=>{if(s[i]){s[i].push(w);return}var d,m;if(O!==void 0)for(var u=document.getElementsByTagName("script"),a=0;a<u.length;a++){var n=u[a];if(n.getAttribute("src")==i||n.getAttribute("data-webpack")==f+O){d=n;break}}d||(m=!0,d=document.createElement("script"),d.charset="utf-8",_.nc&&d.setAttribute("nonce",_.nc),d.setAttribute("data-webpack",f+O),d.src=i),s[i]=[w];var e=(I,E)=>{d.onerror=d.onload=null,clearTimeout(p);var T=s[i];if(delete s[i],d.parentNode&&d.parentNode.removeChild(d),T&&T.forEach(r=>r(E)),I)return I(E)},p=setTimeout(e.bind(null,void 0,{type:"timeout",target:d}),12e4);d.onerror=e.bind(null,d.onerror),d.onload=e.bind(null,d.onload),m&&document.head.appendChild(d)}})(),_.r=s=>{typeof Symbol!="undefined"&&Symbol.toStringTag&&Object.defineProperty(s,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(s,"__esModule",{value:!0})},_.p="/assets/build/",(()=>{var s={277:0};_.f.j=(w,O)=>{var S=_.o(s,w)?s[w]:void 0;if(S!==0)if(S)O.push(S[2]);else{var d=new Promise((n,e)=>S=s[w]=[n,e]);O.push(S[2]=d);var m=_.p+_.u(w),u=new Error,a=n=>{if(_.o(s,w)&&(S=s[w],S!==0&&(s[w]=void 0),S)){var e=n&&(n.type==="load"?"missing":n.type),p=n&&n.target&&n.target.src;u.message="Loading chunk "+w+` failed.
(`+e+": "+p+")",u.name="ChunkLoadError",u.type=e,u.request=p,S[1](u)}};_.l(m,a,"chunk-"+w,w)}};var f=(w,O)=>{var[S,d,m]=O,u,a,n=0;if(S.some(p=>s[p]!==0)){for(u in d)_.o(d,u)&&(_.m[u]=d[u]);if(m)var e=m(_)}for(w&&w(O);n<S.length;n++)a=S[n],_.o(s,a)&&s[a]&&s[a][0](),s[a]=0},i=self.webpackChunksnpt=self.webpackChunksnpt||[];i.forEach(f.bind(null,0)),i.push=f.bind(null,i.push.bind(i))})();var oe={};(()=>{"use strict";var s=_(11581),f=_.n(s),i=_(22914);const w=JSON.parse('{"development":{"theketocoder":{"id":"eb3a4abb-dafe-04f9-15d8-217ba19f7767","aliases":[]}},"staging":{},"production":{"addsauceapp":{"id":"754500cd-247b-485f-a8fb-9f6446e79c80","aliases":[]},"atoleajewelry":{"id":"f5ca8147-fc7e-65e9-1b81-02b76497fddd","aliases":[]},"theketocoder":{"id":"c17042de-198c-4f0e-af5d-56501096cfd7","aliases":[]},"budhagirl":{"id":"7958342b-7fb0-50ee-8db9-651859a4a7f8","aliases":["shopify--budhagirl-eu"]},"duerperformance":{"id":"c9d3c767-310a-d24f-ef33-ab350491dbfb","aliases":["shopify--dishandduer"]},"ladypipa":{"id":"2cd17c76-f07a-47f4-9769-57809ead0528","aliases":["shopify--lady-pipa"]},"prettylavishuk":{"id":"6f83cd0d-a018-e259-5622-dd02714521c1","aliases":["shopify--pretty-lavish-uk"]},"threadbare.official":{"id":"c2fc8c82-9912-ef33-dd56-e92eeae1ffd4","aliases":["shopify--threadbaremenswear"]},"bohomoon":{"id":"c0d75bbf-cccd-49c5-afd4-5282743cc7c1","aliases":["shopify--bohomoon"]},"lemieuxproductsofficial":{"id":"d5bb9e25-a67e-4e83-a139-69948082924f","aliases":[]},"wconcept":{"id":"78c4bd1e-70c3-fb99-8bc5-a98328db8eeb","aliases":[]},"livetheprocess":{"id":"2b96d9ce-2458-1053-bdc5-c43574b3500b","aliases":["shopify--live-the-process"]}}}'),O=new Set(["widget_initialised","widget_loaded","widget_seen"]);function S(n,e,p){const I="https://events.addsauce.com/beacon";if(!I||p!=="https://app.addsauce.com")return null;const E=w.production||{},T=Object.values(E).some(r=>r.id===n||r.aliases.includes(n));if(!O.has(e)||!T)return null;try{const r=new URL(I);return r.protocol==="https:"&&!r.username&&!r.password?r.href:null}catch{return null}}function d(){var p;if(!((p=window.crypto)!=null&&p.getRandomValues))return null;const n=crypto.getRandomValues(new Uint8Array(16));n[6]=n[6]&15|64,n[8]=n[8]&63|128;const e=Array.from(n,I=>I.toString(16).padStart(2,"0")).join("");return`${e.slice(0,8)}-${e.slice(8,12)}-${e.slice(12,16)}-${e.slice(16,20)}-${e.slice(20)}`}(function(n,e){var p,I=function(T,r,o,y){if(!this.endpoint)return;var h=this.endpoint+"/widgets/beacon/"+this.profile,L={event:T,message:r,page_url:n.location.origin+n.location.pathname,in_preview:n.SNPTEmbedLayer!=null};const l=S(this.profile,T,this.endpoint),b=l&&d();return b&&(h=l,Object.assign(L,{schema_version:1,event_id:b,event_time:y,profile_id:this.profile})),fetch(h,{method:"POST",credentials:"omit",keepalive:!!(o&&o.keepalive),headers:{"Content-Type":"application/json"},body:JSON.stringify(L)}).then(function(P){if(b&&P&&!P.ok)throw new Error(`Beacon HTTP ${P.status}`)}).catch(function(P){console.warn("Beacon tracking failed:",P)})},E=function(){var T=this;for(var r in T.attributes)T[r]=T.attributes[r]};p=function(T){this.attributes=T,this.init()},p.prototype={init:function(){E.call(this),this.endpoint=i.getServerEndpoint(this.endpoint),this.apiEndpoint=i.getAPIServerEndpoint(this.endpoint)},track:async function(T,r,o){if(!this.apiEndpoint)return;const y=Date.now();let h=await new(f())(this.apiEndpoint).getOrCreateCurrentSessionID();h&&(r.snpt_sess=h);let L=await new(f())(this.apiEndpoint).getOrCreateCurrentVisitID();return L&&(r.snpt_visit=L),I.call(this,T,r,o,y)}},n.SNPTBeacon=p})(window,document);var m=_(25187),u=_(36437),a=_(20741);_.p="https://cdn.addsauce.com/e/",(function(){const n={cdn:{root:"https://cdn.addsauce.com/",staticFonts:"https://addsauce-static-alt.b-cdn.net/",widgetLoadSegment:"load",symphonyLoadSegment:"load-symphony"},observer:{rootMargin:"1000px",threshold:0},loadingIndicatorCSS:`
      .snptwdgt_init_prldr:not(.snptwdgt_init) {
        width: 100%;
        height: 100px;
        background-image: radial-gradient(circle, #8a8a8a 2px, transparent 2.5px),
          radial-gradient(circle, #8a8a8a 2px, transparent 2.5px),
          radial-gradient(circle, #8a8a8a 2px, transparent 2.5px);
        background-size: 6px 6px;
        background-position: calc(50% - 10px) center, center, calc(50% + 10px) center;
        background-repeat: no-repeat;
        animation: snpt-preloader-breathe 1.6s ease-in-out infinite;
        display: inline-block;
      }
      @keyframes snpt-preloader-breathe {
        0%, 100% { opacity: .35; }
        50% { opacity: .85; }
      }
      @media (prefers-reduced-motion: reduce) {
        .snptwdgt_init_prldr:not(.snptwdgt_init) { animation: none; }
      }
    `},e={head:document.head,placeholderDiv:null,currentScript:null,isDebugMode:window.location.search.includes("debug=1"),isXpMode:window.location.search.includes("xp=1"),isIE:navigator.userAgent.includes("MSIE")||navigator.userAgent.includes("Trident")};let p="",I=null,E=null,T=null,r=null;const o=(t,g)=>{const c=t.lastIndexOf("/");return`${t.substring(0,c+1)}${g}${t.substring(c)}`},y={cdnSentinel:"https://cdn.addsauce.com/e/shoppable-widget-b28968c7dcc56b025954.js",loaderUrl:t=>o(t,n.cdn.symphonyLoadSegment),bundleKey:"shoppable",defaultOn:!0},h=t=>`${t.substring(0,t.lastIndexOf("/")+1)}${n.cdn.symphonyLoadSegment}/loader.js`,L={cdnSentinel:"https://cdn.addsauce.com/e/tv-widget-d1d8adbad28b663e6c3a.js",loaderUrl:t=>o(t,n.cdn.symphonyLoadSegment),bundleKey:"sauce_tv_gallery",defaultOn:!0},l={shoppable:y,loop_clips:y,product_page_gallery:{...y,loaderUrl:t=>`${t}/${n.cdn.symphonyLoadSegment}`},live_ig_feed:{...y,loaderUrl:t=>`${t}/${n.cdn.symphonyLoadSegment}`},upsell_gallery:y,basket_upsell_gallery:y,upsell_similar_gallery:{cdnSentinel:"https://cdn.addsauce.com/e/similar-gallery-b1527f8adbe11458494e.js",loaderUrl:y.loaderUrl,bundleKey:"similar_gallery",defaultOn:!0},similar_gallery:{cdnSentinel:"https://cdn.addsauce.com/e/similar-gallery-b1527f8adbe11458494e.js",loaderUrl:h,defaultOn:!0},reveal_gallery:{cdnSentinel:"https://cdn.addsauce.com/e/reveal-gallery-c841057d331b33269049.js",loaderUrl:h,defaultOn:!0},sauce_tv_gallery:L,highlight_reels:L,product_page_highlight_reels:L,product_finder:{cdnSentinel:"https://cdn.addsauce.com/e/product-finder-e7270bbe6152740a4067.js",loaderUrl:h,defaultOn:!0},bundle_gallery:{cdnSentinel:"https://cdn.addsauce.com/e/melon-bundles-2c6df76de4a7bfb9f9d4.js",loaderUrl:h,defaultOn:!0},merch_alchemy:{cdnSentinel:"https://cdn.addsauce.com/e/merch-alchemy-0b5d7b2bc89f640412e4.js",loaderUrl:h,defaultOn:!0}},b=()=>{try{return new URLSearchParams(window.location.search).get("__widget_engine")}catch{return null}},P=(t,g)=>g==="shoppable"&&u.IC.includes((0,u.Ki)((0,u.at)(t)).name),U=(t,g)=>{try{if(P(t,g))return!1;const c=t&&t.dataset&&t.dataset.renderEngine;if(c)return c==="symphony";const C=b();if(C==="symphony")return!0;if(C==="legacy")return!1;const v=l[g];return!!(v&&v.defaultOn)}catch{return!1}};let N=()=>U(e.currentScript,E);const j=(t,g)=>t==null||g==null||g.trim()===""?!1:t.toLowerCase().includes(g.toLowerCase()),H=()=>{const t=(0,u.Ki)(p);I=t.uid,E=t.type,T=t.name},M=()=>{if(X(),!(0,a.isHtmlScriptElement)(e.currentScript)||!p){i.warnRejectedWidgetSource("preloader");return}const t=e.currentScript.getAttribute("data-exclude-url"),g=e.currentScript.getAttribute("data-exclude-user-agent");if(j(location.href,t)||j(window.navigator.userAgent,g))return;W(n.cdn.root),W(n.cdn.staticFonts),q(),H();const c=i.resolveTrustedApiEndpoint(p);if(!c){i.warnRejectedWidgetSource("preloader");return}W(c,!0),J(),new(f())(c).getOrCreateCurrentSessionID(),r=ne(),N()&&!(E in l)&&console.warn("[Sauce] preloader: symphony unsupported for widget type \u2014 falling back to legacy bundle.",{widgetType:E,src:p}),G(),ie()},W=(t,g=!1)=>{if(!t)return;const c=t.endsWith("/")?t:`${t}/`;if([...document.querySelectorAll('link[rel="preconnect"]')].some(k=>k.href===c&&k.crossOrigin==="anonymous"===g))return;const v=document.createElement("link");v.rel="preconnect",v.href=c,g&&(v.crossOrigin="anonymous"),e.head.appendChild(v)},q=()=>{if(document.getElementById("snptwdgt_init_prldr_indctor_css"))return;const t=document.createElement("style");t.id="snptwdgt_init_prldr_indctor_css",t.appendChild(document.createTextNode(n.loadingIndicatorCSS)),e.head.appendChild(t)},J=()=>{try{const t=i.getServerEndpoint(p);if(I==null||!t)return;const g=new window.SNPTBeacon({profile:I,endpoint:t}),c={src:p,source:E,widget_type:E,widget_name:T,in_preview:window.SNPTEmbedLayer!=null};E=="picture_card"&&(c.item_id=I);let C=!1;const v=R=>{if(!C){C=!0,document.removeEventListener("visibilitychange",k);try{g.track("widget_initialised",c,R)}catch{}}},k=()=>{document.visibilityState==="hidden"&&v({keepalive:!0})};document.addEventListener("visibilitychange",k),window.addEventListener("pagehide",()=>v({keepalive:!0}),{once:!0}),"requestIdleCallback"in window?requestIdleCallback(()=>v(),{timeout:5e3}):setTimeout(()=>v(),1500)}catch{}},X=()=>{if(e.currentScript=(0,a.resolveEmbedScript)(window,{preferGlobal:!0}),!e.currentScript&&e.isIE&&(e.currentScript=Array.from(document.getElementsByTagName("script")).find(t=>t.className.includes("snapppt-widget"))||null),!(0,a.isHtmlScriptElement)(e.currentScript)){e.currentScript=null,p="";return}p=i.pickTrustedScriptSrc(e.currentScript),p&&(e.currentScript._snptResolvedSrc=p,e.currentScript.loadNow=z(),e.isDebugMode&&(console.log(`Sauce current script: ${p}`),console.log(`Load now: ${e.currentScript.loadNow}`)))},z=()=>e.currentScript.dataset.loadr==="instant"||K(e.currentScript)?!0:!!(p||"").match("campaign-signup"),Q=(t,g,c)=>{const C=new URL(t),v=C.host.match(/\.(test|ci)/),k=c?l[g]:null,R=v?k?k.loaderUrl(t):(0,u.O5)(t)?`${t.substring(0,t.lastIndexOf("/")+1)}loader.js`:o(t,n.cdn.widgetLoadSegment):k?k.cdnSentinel:"https://cdn.addsauce.com/e/snap-widget-4045b08e12972f27854a.js",A=k?null:v?`${C.origin}/widgets/widget_loader/snap-vendor-bundle.js`:"https://cdn.addsauce.com/e/snap-widget-vendor-18353b40582448dbc9c4.js";return{widgetSrc:R,vendorSrc:A,key:k?k.bundleKey||g:"legacy",prefetchKey:g}},Z=t=>{const g=(0,u.at)(t),{type:c}=(0,u.Ki)(g);return Q(g,c,U(t,c))},ee=new Set(["highlight_reels","product_page_highlight_reels","reveal_gallery","product_finder"]),K=t=>{var g;const{type:c}=(0,u.Ki)((0,u.at)(t));return ee.has(c)?!0:c==="sauce_tv_gallery"&&((g=t.parentElement)==null?void 0:g.getAttribute("data-sauce-tv-embedded"))!=="1"},V=(t,g="")=>{m.start("snap-widget-script-load");const c=document.createElement("script");return c.src=t,c.async=!0,c.fetchPriority="high",g&&(c.className=g),c},te=(t,g,c)=>{if(c.has(t))return;c.add(t);const C=V(t,"snapppt-widget"),v=g?V(g):null,k=document.createDocumentFragment();v?k.append(C,v):k.append(C),e.head.appendChild(k)},ne=()=>{if(window.SNPT||(window.SNPT={}),window.SNPT.widgetManager)return window.SNPT.widgetManager;const t={},g={},c=new Set;return window.SNPT.widgetManager={widgetReady(C){if(!(0,a.isHtmlScriptElement)(C)||!i.isTrustedWidgetSrc((0,u.at)(C)))return;const{key:v,prefetchKey:k,widgetSrc:R,vendorSrc:A}=Z(C);if(!R)return;v==="legacy"?_.e(6939).then(_.bind(_,44321)).then(D=>D.prefetchLegacyData(C)).catch(()=>{}):_.e(3925).then(_.bind(_,31121)).then(D=>D.prefetchSymphonyData(C,k)).catch(()=>{}),K(C)||(C.className="snptwdgt_init_prldr");const x=t[v];x?x(C):(g[v]||(g[v]=[])).push(C),te(R,A,c)},loaderReady(C,v="legacy"){t[v]=C;const k=g[v];if(k){for(;k.length;)C(k.shift());delete g[v]}}},window.SNPT.widgetManager},G=()=>{if(location.href.includes("lemieux")||e.currentScript.loadNow||(p||"").match("campaign-signup")||typeof window.IntersectionObserver!="function")return F();if(e.placeholderDiv!=null)return;const t=re();let g=!1;const c=new IntersectionObserver(C=>{const v=C[0];!g&&v.isIntersecting&&(g=!0,c.disconnect(),v.target.remove(),e.placeholderDiv=null,F())},n.observer);c.observe(t),setTimeout(()=>{g||!t.isConnected||(c.unobserve(t),c.observe(t))},1e3)},F=()=>r.widgetReady(e.currentScript),re=()=>{const t=document.createElement("div");return t.innerHTML="&nbsp;",e.currentScript.after(t),e.placeholderDiv=t,t},ie=()=>{if(!(!(e.currentScript.getAttribute("data-handle-url-change")==="1")&&!(E==="upsell_similar_gallery"||E==="similar_gallery"||E==="reveal_gallery"||E==="bundle_gallery")))try{let c=function(){const x=new Event("self-destruct-on-url-change.sauce.embed");window.dispatchEvent(x),G()};const C=history.pushState,v=history.replaceState,k=x=>!!x&&x.sauce===!0;let R=k(history.state);const A=x=>{try{if(x==null)return x;const D=new URLSearchParams(window.location.search).get("__widget_engine");if(!D)return x;const $=new URL(x,window.location.href);return $.origin!==window.location.origin||$.searchParams.has("__widget_engine")?x:($.searchParams.set("__widget_engine",D),$.pathname+$.search+$.hash)}catch{return x}};history.pushState=function(...x){x.length>2&&(x[2]=A(x[2])),C.apply(this,x),R=k(x[0]),R||c()},history.replaceState=function(...x){x.length>2&&(x[2]=A(x[2])),v.apply(this,x),R=k(x[0]),R||c()},window.addEventListener("popstate",x=>{const D=R;R=k(x.state),!D&&!R&&c()})}catch(c){console.error("Failure to detect url change",c)}};M(),m.end("preloader")})()})()})();})();
