var instafeedApp = (function instafeedLoad(){/*!
* Instafeed v17.6.0
* Copyright (c) 2026 Mintt Studio
* All rights reserved.
*
* This code is proprietary and protected under international copyright laws.
* Redistribution, use, modification, or sublicensing without explicit written permission from
* Mintt Studio is prohibited.
*
* License inquiries or unauthorized use reports should be directed to:
* legal@minttstudio.com.
*/
function t(t,e,i=0,n=""){if(!y()||!1===window.InstafeedAPI.settings.analytics)return;const s=new FormData;s.append("event",t),s.append("fid",e),s.append("product_id",i),n&&s.append("post_id",String(n)),s.append("shop",Shopify.shop),s.append("appVersion",F),navigator.sendBeacon("https://tr.nfcube.com/index/v1",s)}function e(t,e){let i=t.querySelector(".instafeed-cart-icon")||t.closest(".lightbox-instagram")?.querySelector(".instafeed-cart-icon");if(!i)if(i=document.createElement("div"),i.className="instafeed-cart-icon",i.style.cursor="pointer",i.setAttribute("aria-label","View Cart"),i.onclick=t=>{t.stopPropagation(),t.preventDefault(),window.location.href="/cart"},"instafeed-simple-popup"===e){const e=t.closest(".instafeed-simple-popup-product-list");e&&e.insertAdjacentElement("beforebegin",i)}else t.appendChild(i);return i}function i(t,i,n,s){const o=t.querySelector("button");o.classList.add("instafeed-loading");const a={items:[{id:i,quantity:1}]};fetch(window.Shopify.routes.root+"cart/add.js",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(a)}).then(e=>{if(!e.ok)return e.json().then(e=>{if(422===parseInt(e.status)){o.disabled=!0,o.style.cursor="not-allowed",o.style.opacity="0.5";const i=t.closest(".tagged-products"),n=i?i.querySelector(".tagged-products-image"):null;if(n){const e=t.getAttribute("data-sold-out")||"Sold Out";let i=n.querySelector(".instafeed-sold-out-label");i||(i=document.createElement("div"),i.className="instafeed-sold-out-label",i.textContent=e,n.style.position="relative",n.appendChild(i))}throw new Error(e.message)}})}).then(()=>{fetch(window.Shopify.routes.root+"cart.js").then(t=>t.json()).then(i=>{const n=e(t,s);n.setAttribute("data-count",i.item_count),n.style.display="flex",n.classList.add("instafeed-cart-icon-animate"),setTimeout(()=>{n.classList.remove("instafeed-cart-icon-animate")},600),o.classList.remove("instafeed-loading");const a=new CustomEvent("instafeed:cart:updated",{bubbles:!0,detail:i});if(document.dispatchEvent(a),"undefined"!=typeof theme&&theme&&"function"==typeof theme.CartDrawer)try{"function"==typeof(i=new theme.CartDrawer).init&&i.init()}catch(t){console.warn("Failed to initialize theme cart:",t)}}).catch(t=>{console.error("Error:",t),o.classList.remove("instafeed-loading")})}).catch(t=>{console.error("Error:",t),o.classList.remove("instafeed-loading")})}function n(t){var e=t.getAttribute("data-video-id"),i=document.getElementById(e);i.muted=!i.muted,window.InstafeedAPI.settings.sound=!i.muted,document.querySelectorAll(".instafeed-sound-button").forEach(function(t){t.classList.toggle("sound-on"),t.setAttribute("aria-label",i.muted?"Mute":"Unmute")})}function s(){const t="video-"+window.InstafeedAPI.settings.modalOpen,e=document.getElementById(t),i=document.querySelector(`.instafeed-video-control[data-video-id="${t}"]`);e.paused?(e.play(),i.setAttribute("aria-label","Play"),i.classList.remove("paused"),i.style.display="none"):(e.pause(),i.setAttribute("aria-label","Pause"),i.classList.add("paused"),i.style.display="block")}function o(t,e,i,n){const s=window.InstafeedAPI.settings.carousels[e][i],o=s.length;let d=t.closest("div.instafeed-post-image");if(d||(d=t.closest(".lightbox-instagram")?.querySelector("div.instafeed-post-image")),d){const r=d.querySelector("img");if(r&&o>0){let d;if("number"==typeof n){if(d=n,d<0||d>=o)return}else{const t=r.src;let e=s.findIndex(e=>e.media_url===t);-1===e&&(e=0),d="left"===n?0===e?o-1:e-1:e===o-1?0:e+1}const l=t.closest(".lightbox-instagram").querySelectorAll(".open-resource-picker");l&&l.forEach(t=>{t.setAttribute("data-carousel-index",d)}),document.getElementById(`instafeed-carousel-dots-${e}-${i}`)?.querySelector(".instafeed-carousel-dot.active")?.classList.remove("active"),document.getElementById(`instafeed-carousel-dot-${e}-${i}-${d}`)?.classList.add("active"),r.style.opacity="0.5";const c=document.createElement("div");c.className="instafeed-spinner",c.style.cssText="position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); border: 3px solid #f3f3f3; border-top: 3px solid #555; border-radius: 50%; width: 30px; height: 30px; animation: spin 1s linear infinite;",r.parentElement.appendChild(c);const p=new Image;p.onload=()=>{r.src=s[d].media_url,r.style.opacity="1",c.remove()},p.src=s[d].media_url,setTimeout(()=>{window.instafeedCarouselTransitioning=!1},300),a(t,e,i,d)}}}function a(t,e,i,n){const s=window.InstafeedAPI.settings.instances[e],o=t.closest(".lightbox-instagram");if(o){if(w(o),s?.options?.carouselProductTags){let t=[];const a=window.InstafeedAPI.settings.carousels[e]?.[i];t=a?.[n]?.tagged_products||[];const d=o.querySelector(".box-content"),r=o.querySelector(".instafeed-simple-popup-product-list");d&&d.querySelectorAll(".tagged-products").forEach(t=>t.remove()),r&&(r.querySelectorAll(".tagged-products").forEach(t=>t.remove()),t.length>1?(r.style.justifyContent="initial",r.style.padding="0 0 0 15px"):(r.style.justifyContent="center",r.style.padding="0"));const l=o.querySelector(".open-resource-picker[data-picture-id]")?.getAttribute("data-picture-id");t.length>0&&t.forEach(t=>{const e=s.t(t,l,d?"":"instafeed-simple-popup",parseInt(i),n);d?d.insertAdjacentHTML("beforeend",e):r&&r.insertAdjacentHTML("beforeend",e)})}window.InstafeedAPI?.renderHotspotsForLightbox&&window.InstafeedAPI.renderHotspotsForLightbox(o)}}function d(t){try{const e=JSON.parse(t||"{}");return"object"==typeof e&&null!==e?e:{}}catch(t){return{}}}function r(t,e){return(Array.from(t.querySelectorAll(".box-content .tagged-products, .instafeed-simple-popup-product-list .tagged-products"))||[]).map(t=>{const i=t.getAttribute("data-tagging-id");if(!i)return null;const n=d(t.getAttribute("data-placement"))[String(e)]??null;if(!n||null==n.x_pct||null==n.y_pct)return null;const s=Number(n.x_pct),o=Number(n.y_pct);if(!Number.isFinite(s)||!Number.isFinite(o))return null;const a=t.querySelector(".instafeed-product-name");let r="";if(a){const t=a.querySelector("div");if(t){const e=t.textContent.trim(),i=a.textContent.trim();r=[e?i.slice(0,i.indexOf(e)).trim():i,e].filter(Boolean).join(" ")}r||(r=a.textContent.trim())}const l=t.querySelector("[data-picture-id]"),c=l?l.getAttribute("data-picture-id"):"",p=l&&l.getAttribute("data-post-index")||"0";return{tagId:i,xPct:x(s,0,100),yPct:x(o,0,100),productName:r,pictureId:c,postIndex:p,carouselIndex:e}}).filter(Boolean)}function l(t){if(!t)return;const e=t.querySelector(".instafeed-hotspots-layer"),i=t.querySelector(".instafeed-post-image");if(!e||!i)return;const n=t.querySelector(".instafeed-carousel-dot.active"),s=r(t,n?n.id?.split("-").pop()??"0":"0"),o=t.closest(".instafeed-modals-wrapper")?.getAttribute("data-feed-id"),a=void 0!==window.InstafeedAPI.settings&&o&&window.InstafeedAPI.settings.instances?window.InstafeedAPI.settings.instances[o]:null;if(e.innerHTML=s.map(t=>{const e=t.productName?`${I(t.productName)} `:"",i=e?`${e} `:"",n=a&&a.options&&a.options.admin&&t.pictureId?`× `:"";return`
${n}${i}
`}).join(""),0===s.length)return void w(t);const d=i.querySelector("img:first-of-type, video:first-of-type"),l=()=>{const t=i.getBoundingClientRect(),n=d?.naturalWidth||d?.videoWidth||d?.clientWidth||t.width,s=d?.naturalHeight||d?.videoHeight||d?.clientHeight||t.height,o=d&&window.getComputedStyle(d).objectFit||"cover";e.querySelectorAll(".instafeed-hotspot-wrapper").forEach(e=>{const i=Number(e.getAttribute("data-x-pct")),a=Number(e.getAttribute("data-y-pct"));if(Number.isFinite(i)&&Number.isFinite(a))if(window.InstafeedAPI?.hotspotUtils?.percentToClientPoint&&t.width>0&&t.height>0){const d=window.InstafeedAPI.hotspotUtils.percentToClientPoint(i,a,t,n,s,o);e.style.left=`${d.left}px`,e.style.top=`${d.top}px`}else e.style.left=`${i}%`,e.style.top=`${a}%`})};requestAnimationFrame(l),"IMG"!==d?.tagName||d.complete||d.addEventListener("load",l,{once:!0}),"VIDEO"===d?.tagName&&d.readyState<1&&d.addEventListener("loadedmetadata",l,{once:!0})}function c(t){if(!t||!window.InstafeedAPI?.renderHotspotsForLightbox)return;const e=window.InstafeedAPI.renderHotspotsForLightbox;e(t),setTimeout(()=>e(t),H)}function p(t,e){let i=t.parentElement;for(;i&&i!==e;){const t=getComputedStyle(i),e=t.overflowX||t.overflow;if(("auto"===e||"scroll"===e||"overlay"===e)&&i.scrollWidth>i.clientWidth)return i;i=i.parentElement}return null}function u(t,e){const i=t.getBoundingClientRect(),n=e.getBoundingClientRect(),s=t.scrollLeft+(n.left-i.left)-i.width/2+n.width/2;t.scrollTo({left:Math.max(0,s),behavior:"smooth"})}function h(t,e){const i=p(e,t);i&&u(i,e)}function f(t,e,i=!1){const n=e.getAttribute("data-tagging-id");if(!n)return;t.querySelectorAll(".instafeed-hotspot").forEach(t=>t.classList.remove("active")),e.classList.add("active");const s=t.querySelector(`.tagged-products[data-tagging-id='${n}']`);s&&(t.classList.add("instafeed-hotspot-has-selection"),t.querySelectorAll(".tagged-products.instafeed-hotspot-selected").forEach(t=>t.classList.remove("instafeed-hotspot-selected")),s.classList.add("instafeed-hotspot-selected"),i&&h(t,s),requestAnimationFrame(()=>{m(e.closest(".instafeed-hotspot-wrapper"))}))}function w(t){t&&(t.classList.remove("instafeed-hotspot-has-selection"),t.querySelectorAll(".instafeed-hotspot-wrapper").forEach(t=>{t.querySelector(".instafeed-hotspot")?.classList.remove("active"),t.classList.remove("instafeed-hotspot-tooltip-align-left","instafeed-hotspot-tooltip-align-right")}),t.querySelectorAll(".tagged-products.instafeed-hotspot-selected").forEach(t=>t.classList.remove("instafeed-hotspot-selected")))}function m(t){const e=t?.querySelector(".instafeed-hotspot-tooltip");if(!e)return;t.classList.remove("instafeed-hotspot-tooltip-align-left","instafeed-hotspot-tooltip-align-right"),e.offsetHeight;const i=e.getBoundingClientRect(),n=(window.innerWidth||document.documentElement.clientWidth)-8;i.right>n?t.classList.add("instafeed-hotspot-tooltip-align-right"):i.left<8&&t.classList.add("instafeed-hotspot-tooltip-align-left")}function g(t,e,i=!1){const n=e.getAttribute("data-tagging-id");if(!n)return;const s=t.querySelector('.instafeed-hotspot[data-tagging-id="'+CSS.escape(n)+'"]');s&&f(t,s,i)}function v(){if(void 0===window.InstafeedAPI.settings||!window.InstafeedAPI.settings.modalOpen)return;const t=document.getElementById(window.InstafeedAPI.settings.modalOpen)?.querySelector(".lightbox-instagram");t&&window.InstafeedAPI.renderHotspotsForLightboxWithStability(t)}function b(t){const e=t.target,i=e.closest(".instafeed-hotspot");if(i)return{lightbox:i.closest(".lightbox-instagram"),kind:"hotspot",element:i};const n=e.closest(".lightbox-instagram .tagged-products");return n?{lightbox:n.closest(".lightbox-instagram"),kind:"card",element:n}:{lightbox:null,kind:null,element:null}}function $(t,e=0,i=0){if(window.InstafeedAPI.settings.sliderIsPaused)return;window.InstafeedAPI.settings.sliderState[e]||(window.InstafeedAPI.settings.sliderState[e]={currentTransform:0,minTransform:0,isTransitioning:!1});const n=window.InstafeedAPI.settings.sliderState[e],s=new URLSearchParams(window.location.search),o=y()?.shop||s.get("shop"),a=["wearelittleas.myshopify.com"].includes(o)||("rtl"===document.documentElement.dir||"rtl"===getComputedStyle(document.documentElement).direction||"rtl"===document.body.dir||"rtl"===getComputedStyle(document.body).direction)&&!["81c182-2.myshopify.com"].includes(o);if(a&&(t=-t),n.isTransitioning)return;const d=parseFloat((window.InstafeedAPI.settings.sliderRowSize[e]*(window.InstafeedAPI.settings.totalImages[e]/window.InstafeedAPI.settings.sliderNumVisibleImages[e]-1)).toFixed(3));d-n.currentTransformn.minTransform&&(n.currentTransform=-d);const r=document.querySelector(`.${N}-new-layout-wrapper[data-feed-id="${e}"]`);if(!r)return;let l=n.currentTransform;if(a&&(l=Math.abs(n.currentTransform)),window.InstafeedAPI.settings.dynamicSliderArrows.includes(o)){const t=document.querySelector(`.${N}-new-layout-container[data-feed-id="${e}"] .${N}-new-arrow-prev`),i=document.querySelector(`.${N}-new-layout-container[data-feed-id="${e}"] .${N}-new-arrow-next`);t&&(t.style.display=0===n.currentTransform?"none":"block"),i&&(i.style.display=n.currentTransform===-d?"none":"block")}let c=4===i?window.instafeedContinuousSlideSpeed:500,p=4===i?`transform ${window.instafeedContinuousSlideSpeed/1e3}s linear`:"transform 0.5s ease-in-out";r.style.transition=p,r.style.transform=`translateX(${l}px)`,n.isTransitioning=!0,setTimeout(()=>{r.style.transition="",n.isTransitioning=!1},c)}function y(){return"undefined"!=typeof Shopify?Shopify:null}function I(t){return(null==t?"":String(t)).replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'")}function x(t,e,i){return Math.min(i,Math.max(e,t))}function _(t){return Math.round(1e3*t)/1e3}function k(t,e,i,n,s="cover"){const o=Number(t)||0,a=Number(e)||0,d=Number(i)||0,r=Number(n)||0,l=(s||"cover").toLowerCase();if(o<=0||a<=0||d<=0||r<=0)return{offsetX:0,offsetY:0,width:o,height:a};if("fill"===l)return{offsetX:0,offsetY:0,width:o,height:a};let c;c="contain"===l?Math.min(o/d,a/r):"none"===l?1:"scale-down"===l?Math.min(1,Math.min(o/d,a/r)):Math.max(o/d,a/r);const p=d*c,u=r*c;return{offsetX:(o-p)/2,offsetY:(a-u)/2,width:p,height:u}}function S(t,e,i,n,s,o="cover"){const a=k(i.width,i.height,n,s,o),d=t-i.left-a.offsetX,r=e-i.top-a.offsetY,l=x(d,0,a.width),c=x(r,0,a.height);return{x_pct:a.width>0?_(l/a.width*100):0,y_pct:a.height>0?_(c/a.height*100):0}}function T(t,e,i,n,s,o="cover"){const a=k(i.width,i.height,n,s,o),d=x(Number(t)||0,0,100)/100,r=x(Number(e)||0,0,100)/100,l=i.left+a.offsetX+a.width*d,c=i.top+a.offsetY+a.height*r;return{clientX:l,clientY:c,left:l-i.left,top:c-i.top}}const P="nfcube.com",M=["instafeed.mintt-studio.com","instafeed.nfcube.com"],A="instafeed.nfcube.com",O="api.nfcube.com",F="17.9.0",E="feed",L="insta-feed",C=".instafeed-lightbox",N="instafeed",D=!1,z=3,R=1024,H=100;window.instafeedEvents=window.instafeedEvents||[];class U{constructor(){this.listeners=window.instafeedEvents=window.instafeedEvents||[],this.debugMode=!1}addListener(t,e,i,n={}){t.addEventListener(e,i,n),this.listeners.push({element:t,event:e,handler:i}),this.debugMode&&console.log(`Added listener for ${e}`,this.listeners)}removeListener(t,e,i){t.removeEventListener(e,i),this.listeners=this.listeners.filter(n=>!(n.element===t&&n.event===e&&n.handler===i)),this.debugMode&&console.log(`Removed listener for ${e}`,this.listeners)}clearAllListeners(){this.listeners.forEach(({element:t,event:e,handler:i})=>{t.removeEventListener(e,i)}),this.listeners=[],this.debugMode&&console.log("All listeners have been removed")}}const j=new U;var Instafeed=function t(){return class{constructor(t){this.availableLanguages=["en","es","de","fr","sv","da","it","nl","nb","ja","pt-PT","pt-BR","zh-CN","tr","ko"],this.accountUsername="",this.options={target:L,injectedData:!1,language:"en",locale:"en",showLoading:!0,forceUpdate:!1,analytics:!1,carouselProductTags:!1,key:"",overrides:"",picturesLoaded:0,picturesNeeded:0,admin:M.includes(window.location.hostname)};const e=y();e?.locale&&(this.options.locale=e.locale,e.locale.startsWith("es-")?this.options.language="es":this.availableLanguages.includes(e.locale)&&(this.options.language=e.locale)),Object.assign(this.options,t),this.options.admin||this.i(),document.querySelectorAll(C).forEach(t=>{t.parentNode.removeChild(t)})}o(t){var e=window.InstafeedAPI.settings.translations,i=this.options.language;return e[i]&&e[i][t]?e[i][t]:"en"!==i&&e.en&&e.en[t]?e.en[t]:t}l(t){var e;return window.InstafeedAPI.settings.translations[t]?Promise.resolve(window.InstafeedAPI.settings.translations[t]):(e=this,fetch("https://"+A+"/i18n/storefront/instafeed-"+t+".json").then(function(t){if(!t.ok)throw new Error("i18n");return t.json()}).then(function(e){return window.InstafeedAPI.settings.translations[t]=e,e}).catch(function(){return"en"===t?{}:e.l("en").then(function(e){return window.InstafeedAPI.settings.translations[t]=e,e})}))}p(){return 100===parseInt(this.options.columns,10)}u(){return 100===parseInt(this.options.columnsMobile,10)}h(){return this.p()||this.u()}run(t){var e,i=this;if(Date.now(),!window.InstafeedAPI.settings.translations[this.options.language])return this.l(this.options.language).then(function(){return i.run(t)});if(e=document.getElementById(this.options.target),this.m="number"==typeof t?t:e?e.clientWidth:0,this.options.injectedData)return this.options.picturesNeeded=this.options.limit,i.v(this.options.injectedData),!0;if(e&&0===this.m&&this.h())return this.$(e),!1;this.options.corners=4===parseInt(this.options.format)?"50%":this.options.corners+"px",window.InstafeedAPI.settings.analytics=Boolean(this.options.analytics),window.InstafeedAPI.settings.instances[this.options.feedId]=i,!this.I(this.options.charge)&&parseInt(this.options.rows)>parseInt(this.options.rowsLimit)&&(this.options.rows=this.options.rowsLimit),8===parseInt(this.options.layout)?this.options.picturesNeeded=1:this._()&&this.I(this.options.charge)?this.u()?this.options.picturesNeeded=this.options.rowsMobile*this.k(this.m):this.options.picturesNeeded=this.options.rowsMobile*this.options.columnsMobile:this.p()?this.options.picturesNeeded=this.options.rows*this.k(this.m):this.options.picturesNeeded=this.options.rows*this.options.columns,this.options.admin&&this.options.showLoading&&(e.innerHTML='
'+this.o("HANG_ON")+"
"),!this.options.admin&&parseInt(this.options.loadingAnimation)>0&&(e.innerHTML='
');const n=window.adminNativeFetch?window.adminNativeFetch:fetch,s=new Headers;return this.options.admin&&ShopifyApp?.EncryptedData&&s.set("X-Mintt-Encrypted-Data",ShopifyApp.EncryptedData),n(this.S(),{headers:s}).then(t=>{if(!t.ok)throw new Error(`${t.status} ${t.statusText}`);return t.json()}).then(t=>{try{i.v(t)}catch(t){console.error("Parse function error:",t.message)}}).catch(t=>{console.log("Fetch error:",t.message),this.options.admin&&this.options.error.call(this,{meta:{code:500,username:"",error_message:"Instagram connection failed. Please try saving your feed again."}})}).finally(()=>{Date.now()}),!0}v(t){const e=document.getElementById(this.options.target);if(!e)return!1;if("object"!=typeof t)throw new Error("Invalid JSON response");const{meta:{code:i,error_message:n}}=t,s=parseInt(i,10);if(this.m=this.h()&&"number"!=typeof this.m?e?e.clientWidth:null:this.m,e.innerHTML="",200!==s)return this.options.admin&&"function"==typeof this.options.error&&this.options.error.call(this,t),!1;"function"==typeof this.options.success&&this.options.success.call(this,t),this.T(t);let o=t.data,a=t.meta.profile_picture,d=t.meta.followers,r="";this.accountUsername=t.meta.username;const l=2===parseInt(this.options.openIg)?"instafeed-simple-popup":"",c=this._(!0)&&"instafeed-simple-popup"!==l;for(let e=0,i=o.length;e0&&(this.I(this.options.charge)||this.options.admin)){let t=i.tagged_products;this.options.carouselProductTags&&i?.carousel?.length>0&&(t=i.tagged_products.filter(t=>this.P(t,0))),d=t.length;const s=0;t.forEach(t=>{n+=this.t(t,i.id,l,parseInt(e),s)})}let p=i.carousel?this.M(i,e):"",u=i.hasOwnProperty("alt_text")?this.A(i.alt_text):"Instagram post with the caption: "+this.A(this.O(i,"caption.text").substring(0,64))+"...";const h="pristine-avanti.myshopify.com"===this.options.shopOrigin,f=h?"controls":"",w=h?"instafeed-video-controls-show":"";let m="",g="",v="",b="";if("video"===i.type&&i.hasOwnProperty("videos")){m=N+"-video",g="
",v="
";const t=this.F(i);b=p+"
'}else{const t=i.images?.standard_resolution?.url||"";b=p+" "}const $=0===e?o[Math.min(this.options.picturesNeeded,o.length)-1]:o[e-1],y=e>=Math.min(this.options.picturesNeeded,o.length)-1?o[0]:o[e+1],x=$?$.id:i.id,_=y?y.id:i.id,k=8===parseInt(this.options.layout)&&o.length<=1;b=(c||!this._(!0)||k?"":"
")+v+g+b;let S="instafeed-simple-popup"===l?this.L(l,d,o.length):this.C(l,s,o.length);const T={model:i,id:i.id,postIndex:parseInt(e),fullId:i.id,minusId:x,plusId:_,link:i.link,image:i.images.standard_resolution.url,video:m,tagged_username_link:i.user.username.length>0&&this.accountUsername!==i.user.username&&1!==parseInt(this.options.hideUsernames,10)?"":"",username:t.meta.username,userPicture:a.length>0?a:"https://"+A+"/assets/img/logo-instagram-transparent.png",imageFullHtml:b,taggedProduct:n,date:this.N(i.created_time),caption:this.A(this.O(i,"caption.text")),likes:i?.likes?.count>0?""+this.D(i.likes.count,1)+" ":"",location:this.O(i,"location.name")},P=(i.tagged_products||[]).length>0||this.options.admin&&this.I(this.options.charge);T.hotspotsLayer=P?"
":"",r+=this.R(S,T)}if(this.options.picturesLoaded>=this.options.picturesNeeded||t.data.length===this.options.picturesLoaded)break}if(clearInterval(instafeedScrollIntervals[this.options.feedId]),r.trim().length>0){const t=document.querySelector('.instafeed-modals-wrapper[data-feed-id="'+this.options.feedId+'"]');t?this.H(r,t):this.H(''+r+"
")}if(this.options.injectedData)return this.U(),!0;var p=0;8===parseInt(this.options.layout)?p=100:this._()&&this.I(this.options.charge)?this.u()?(p=parseFloat(100/this.k(this.m)).toFixed(3),this.m=void 0):p=parseFloat(100/this.options.columnsMobile).toFixed(3):this.p()?(p=parseFloat(100/this.k(this.m)).toFixed(3),this.m=void 0):p=parseFloat(100/this.options.columns).toFixed(3),window.InstafeedAPI.settings.sliderNumVisibleImages[this.options.feedId]=parseInt(Math.round(100/p)),window.InstafeedAPI.settings.totalImages[this.options.feedId]=this.options.picturesLoaded,e.innerHTML+=this.j(o,this.A),this.G(),8===parseInt(this.options.layout)&&this.V(),this.Y(d,a),this.W(),this.U(),this.q(),2!==parseInt(this.options.openIg,10)&&3!==parseInt(this.options.openIg,10)||(this.B(),this.X(),this.J()),2===parseInt(this.options.openIg,10)&&this._()&&this.Z(),2===parseInt(this.options.openIg,10)&&this.I(this.options.charge)&&this.K(),this.I(this.options.charge)&&(2===parseInt(this.options.openIg,10)||3===parseInt(this.options.openIg,10))&&this._()&&this.tt();const u=new CustomEvent("instafeedAppLoaded",{detail:{account:this.accountUsername,feedId:this.options.feedId}});return document.dispatchEvent(u),instafeedFeedsLoaded.push(this.options.feedId),!0}P(t,e){const i=String(e);return parseInt(t.index)===e||!(!t.placement||null==t.placement[i])}T(t){window.InstafeedAPI.settings.carousels[this.options.feedId]=[],t.data.forEach((t,e)=>{if(t?.carousel?.length>0){const i=t.tagged_products||[];window.InstafeedAPI.settings.carousels[this.options.feedId][e]=t.carousel.map((t,e)=>{const n=i.filter(t=>this.P(t,e));return{media_url:t.thumbnail_url?t.thumbnail_url:t.media_url,tagged_products:n}})}})}M(t,e){const i=this.options.feedId;let n="";return t.carousel.forEach((t,s)=>{n+=` `}),`\n
\n
\n ${n}
\n `}C(t,e,i){var n;const s=this._(!0)&&"instafeed-simple-popup"!==t,o=8===parseInt(this.options.layout)&&void 0!==i&&i<=1,a=this.o("TAG_PRODUCTS"),d=this.o("TAG_COLLECTIONS"),r=this.I(this.options.charge)&&parseInt(this.options.likes)>0&&4!==parseInt(this.options.apiVersion)?"{{likes}}":"";n=this.options.admin&&this.I(this.options.charge)?""+a+" "+d+"
":"";let l=this.options.admin&&!this.I(this.options.charge)?`${this.o("SHOW_PRODUCTS_MESSAGE")}${this.o("UPGRADE")}
`:"";const c=`✕
`,p=this._(!0)?"":c,u=this._(!0)&&!s?c:"",h=this._(!0)||o?"":"
",f=this._(!0)||o?"":"
",w=parseInt(this.options.instagramLinks)>0?"• "+this.o("VIEW_ON_INSTAGRAM")+" ":"",m="{{username}}
";let g=""+p+h;g+="
{{imageFullHtml}}{{hotspotsLayer}}
",g+=`\n
\n \n ${l}\n
\n {{tagged_username_link}}\n ${n}\n ${e>0||this.options.admin?"
{{taggedProduct}}
":""}\n ${r.length>0?``:""}\n
{{caption}}
\n
\n
\n {{date}} ${w} \n
\n\n
`;const v=o?"":`\n
`;return g+=s?`\n
\n ${c.replace("✕","")}\n ${v}\n
`:"",g+=`
${f}
`,g}L(t,e,i){const n=8===parseInt(this.options.layout)&&void 0!==i&&i<=1,s=this.options.admin&&this.I(this.options.charge)?""+this.o("TAG_PRODUCTS")+"
":"",o=`✕
`,a=this._(!0)?"":o,d=this._(!0)?o:"",r=this._(!0)||n?"":"
",l=this._(!0)||n?"":"
",c=s+"";let p=""+a+r;return p+="
{{imageFullHtml}}{{hotspotsLayer}} "+c+"
",p+=d+"
"+l+"
",p}W(){this._(!0)&&document.querySelectorAll("."+N+"-post-image").forEach(t=>{const e=t.nextElementSibling,i=e?e.querySelector("."+N+"-header"):null;i&&t.parentNode.insertBefore(i,t)})}Y(t,e){const i=document.getElementById(this.options.target),n=this.I(this.options.charge)&&parseInt(this.options.apiVersion)>4&&(1===parseInt(this.options.showFollowers)||3===parseInt(this.options.showFollowers)),s=this.I(this.options.charge)&&parseInt(this.options.apiVersion)>4&&parseInt(this.options.showFollowers)>1,o=n?`${this.o("FOLLOWERS").replace("{number}",this.D(t))} `:"",a=0===parseInt(this.options.feedId)?"undefined"!=typeof instafeedLocalTitle&&instafeedLocalTitle.length>0:void 0!==window["instafeed"+this.options.feedId+"Title"]&&window["instafeed"+this.options.feedId+"Title"].length>0,d=a&&0===parseInt(this.options.feedId)?instafeedLocalTitle:window["instafeed"+this.options.feedId+"Title"],r=this.options.title.length>0||a;let l="";s&&(l+=``),r&&(l+=`${a?d:this.options.title} `),n&&(l+=o),l.length>0&&this.H(l,i,i.firstChild)}G(){const t=document.getElementById(this.options.target),e=document.querySelector(`.${N}-new-layout-container[data-feed-id="${this.options.feedId}"]`),i=document.querySelector(`.${N}-new-layout-wrapper[data-feed-id="${this.options.feedId}"]`);requestAnimationFrame(()=>{const n=parseFloat(t.offsetWidth.toFixed(3)),s=8===parseInt(this.options.layout),o=s?Math.min(260,Math.max(150,Math.round(.28*(window.innerWidth||n)))):null,a=null!==o?Math.min(o,n):n,d=parseFloat((a/window.InstafeedAPI.settings.sliderNumVisibleImages[this.options.feedId]*(parseInt(this.options.space)/100)).toFixed(3)),r=parseInt(window.InstafeedAPI.settings.sliderNumVisibleImages[this.options.feedId]-1),l=parseFloat((r*d).toFixed(3)),c=parseFloat((a-l).toFixed(3)),p=parseFloat((c/window.InstafeedAPI.settings.sliderNumVisibleImages[this.options.feedId]).toFixed(3)),u=1===parseInt(this.options.format)?parseFloat((p*(16/9)).toFixed(3)):2===parseInt(this.options.format)?parseFloat((p*(5/4)).toFixed(3)):3===parseInt(this.options.format)?parseFloat((p*(3/4)).toFixed(3)):5===parseInt(this.options.format)?parseFloat((p*(4/3)).toFixed(3)):parseFloat(p.toFixed(3));if(document.querySelectorAll(`.${N}-new-layout-item[data-feed-id="${this.options.feedId}"]`).forEach(t=>{t.style.width=`${p}px`,t.style.height=`${u}px`}),1===parseInt(this.options.showProducts,10)&&this.I(this.options.charge)&&u>=300&&(document.querySelectorAll(`.${N}-new-layout-item[data-feed-id="${this.options.feedId}"] .instafeed-product-item img`).forEach(t=>{t.style.display="block",t.style.height=Math.min(parseFloat((.15*u).toFixed(3)),60)+"px",t.style.width=Math.min(parseFloat((.15*u).toFixed(3)),60)+"px"}),document.querySelectorAll(`.${N}-new-layout-item[data-feed-id="${this.options.feedId}"] .instafeed-tagged-buy-button-simple-popup`).forEach(t=>{t.style.display="block"})),s?(e.style.width=`${a}px`,e.style.height=`${u}px`):(e.style.width=`${n}px`,e.style.height=`${u}px`),i.style.gap=`${d}px`,window.InstafeedAPI.settings.sliderStepSize[this.options.feedId]=0===this.options.sliderBehavior||2===this.options.sliderBehavior?n+d:p+d,window.InstafeedAPI.settings.sliderRowSize[this.options.feedId]=n+d,window.InstafeedAPI.settings.totalImages[this.options.feedId]=window.InstafeedAPI.settings.sliderNumVisibleImages[this.options.feedId]&&(i.style.display="grid",e.style.height="unset",i.style.gridTemplateColumns="repeat("+window.InstafeedAPI.settings.sliderNumVisibleImages[this.options.feedId]+", 1fr)"),7===parseInt(this.options.layout)&&window.InstafeedAPI.settings.totalImages[this.options.feedId]>=window.InstafeedAPI.settings.sliderNumVisibleImages[this.options.feedId]){if(1===parseInt(this.options.showHalfPosts,10)){const t=parseFloat((p/2).toFixed(3));i.style.transform="translateX(-"+t+"px)"}j.addListener(t,"swiped-left",t=>{t.detail.touchType&&window.InstafeedAPI.sliderMove(1,this.options.feedId)}),j.addListener(t,"swiped-right",t=>{t.detail.touchType&&window.InstafeedAPI.sliderMove(-1,this.options.feedId)}),this._()||this.et(),window.InstafeedAPI.settings.sliderState={},this.options.sliderBehavior>1&&(4===this.options.sliderBehavior&&window.InstafeedAPI.sliderMove(1,this.options.feedId,this.options.sliderBehavior),instafeedScrollIntervals[this.options.feedId]=setInterval(()=>{window.InstafeedAPI.sliderMove(1,this.options.feedId,this.options.sliderBehavior)},instafeedSlideSpeed))}})}V(){var t=this.options.feedId,e=this;requestAnimationFrame(function(){function i(){s.querySelectorAll("video").forEach(function(t){t.pause(),t.removeAttribute("src"),t.load()}),sessionStorage.setItem(o,window.location.pathname),s.remove()}var n,s,o,a,d,r,l,c,p,u,h,f;e.options.admin||(n=document.getElementById(e.options.target))&&n.parentNode!==document.body&&document.body.appendChild(n),(s=document.querySelector("."+N+'-new-layout-container[data-feed-id="'+t+'"]'))&&(o=N+"_floating_closed_"+t,sessionStorage.getItem(o)?s.remove():(a=s.querySelector("."+N+'-new-layout-wrapper[data-feed-id="'+t+'"]'))&&(d=a.querySelectorAll("."+N+"-new-layout-item"),(r=d[0])&&(d.forEach(function(t,e){t.style.display=0===e?"block":"none"}),s.querySelectorAll("."+N+"-hover-layer").forEach(function(t){t.style.opacity="0",t.style.pointerEvents="none"}),r.querySelector("."+N+"-floating-close-btn")||((l=r.querySelector("video"))&&(l.muted=!window.InstafeedAPI.settings.sound,(c=document.createElement("div")).setAttribute("role","button"),c.tabIndex=0,c.className=N+"-sound-button "+N+"-floating-sound-btn"+(window.InstafeedAPI.settings.sound?" sound-on":""),c.setAttribute("aria-label",window.InstafeedAPI.settings.sound?"Unmute":"Mute"),c.setAttribute("data-video-id",l.id),c.addEventListener("click",function(t){t.stopPropagation(),window.InstafeedAPI.toggleSound(c)}),c.addEventListener("keydown",function(t){"Enter"!==t.key&&" "!==t.key||(t.preventDefault(),window.InstafeedAPI.toggleSound(c))}),r.appendChild(c)),(p=function(t,e,i,n){var s=document.createElement("button");s.type="button",s.className=t,s.setAttribute("aria-label",e),s.innerHTML=i,s.onclick=n,r.appendChild(s)})(N+"-floating-minimize-btn","Minimize","−",function(){s.classList.add(N+"-floating-minimized")}),p(N+"-floating-close-btn","Close post","×",i)),(u=s.querySelector("."+N+"-floating-pill"))||((u=document.createElement("div")).className=N+"-floating-pill",u.setAttribute("aria-label","Expand post"),(h=r.getAttribute("data-"+N+"-thumbnail")||r.querySelector("img")&&r.querySelector("img").getAttribute("data-"+N+"-src")||r.querySelector("video")&&r.querySelector("video").getAttribute("data-poster"))&&(u.style.backgroundImage='url("'+h.replace(/"/g,'\\"')+'")'),u.onclick=function(t){t.target.closest("."+N+"-floating-pill-close")||s.classList.remove(N+"-floating-minimized")},(f=document.createElement("button")).type="button",f.className=N+"-floating-pill-close",f.innerHTML="×",f.setAttribute("aria-label","Close post"),f.onclick=function(t){t.stopPropagation(),i()},u.appendChild(f),s.appendChild(u)),requestAnimationFrame(function(){s.classList.add(N+"-floating-visible")}))))})}it(t,e,i,n){if(this.options.admin&&""!==t){const s=0!==i&&i!==t;return`${s?t+" - "+i:t}${!s&&e===n&&e.toString().length>1?` ${e}`:""}
`}if(t=Number(t),e=Number(e)||0,i=Number(i)||0,n=Number(n)||0,!(t>0))return"";const s=i>0&&i!==t,o=y(),a=o&&1!==parseFloat(o.currency?.rate||1)?o.currency.rate:1;1!==a&&(t=Math.ceil(t*a),i>0&&(i=Math.ceil(i*a)),!s&&e>0&&(e=Math.ceil(e*a)));const d=o?t=>new Intl.NumberFormat(void 0,{style:"currency",currency:o.currency?.active||"USD"}).format(t):t=>Number(t).toFixed(2),r=s?d(t)+" - "+d(i):d(t),l=!s&&e>0&&e>t&&e===n?d(e):"";return`${r}${l?` ${l}`:""}
`}nt(t,e){let i='';const n=Math.floor(t),s=t%1!=0;for(let t=0;t<5;t++)i+=t
':t===n&&s?'
':'
';return i+=`
${e>1?" | "+this.o("REVIEWS").replace("{number}",e):"("+e+")"} `,i}j(t){let e="",i=0,n=0;for(let s of t)if(i++,n=s?.tagged_products?.length||0,e+=this.st(s,i,n),i>=this.options.picturesNeeded||t.length===i)break;let s=window.InstafeedAPI.settings.dynamicSliderArrows.includes(this.options.shopOrigin)?"display:none;":"",o="";return i>window.InstafeedAPI.settings.sliderNumVisibleImages[this.options.feedId]&&this.options.sliderBehavior<=1&&7===parseInt(this.options.layout)&&(o=`\n \n \n `),`\n `}st(t,e,i){const n=t.id,s=parseInt(this.options.openIg,10),o=parseInt(this.options.showProducts,10);let a=t.images.standard_resolution,d=this.A(t.caption.text).substring(0,64),r=t.hasOwnProperty("alt_text")?this.A(t.alt_text):"Instagram post with the caption: "+this.A(d)+"...";const l=Array.isArray(t.tagged_products)&&t.tagged_products.length>0;let c=1===o&&4!==parseInt(this.options.format)&&t.hasOwnProperty("tagged_products")&&t.tagged_products.length>0&&this.I(this.options.charge)?this.ot(t.tagged_products):"",p=c.length>0?"inline-product":"",u=parseInt(this.options.autoplay,10),h=!1,f="loop";u>0&&"video"===t.type&&this.I(this.options.charge)&&(h=!0,3===u&&(f=""));let w=this.options.admin&&!this._(!0)&&e<=4?"fetchpriority='high' loading='eager' src='"+t.images.standard_resolution.url+"'":"class='"+N+"-lazy-image' src='//"+A+"/assets/img/placeholder.png' data-instafeed-src='"+t.images.standard_resolution.url+"'",m=h?` `:` `;m+=this.I(this.options.charge)&&t.user.username.length>0&&this.accountUsername!==t.user.username&&1!==parseInt(this.options.hideUsernames,10)&&4!==parseInt(this.options.format)?`@${t.user.username}
`:"";let g="inline-product"===p?`${c}
`:`${this.dt(t)}
`,v="";1===s?v="tabindex='0' role='link' data-instafeed-keydown-event='true' aria-label='Go to Instagram post'":2===s||3===s?v="tabindex='0' data-instafeed-role-button='true' data-instafeed-keydown-event='true' aria-haspopup='dialog' aria-label='Instagram post opens in a popup'":4===s&&l&&(v="tabindex='0' role='link' data-instafeed-keydown-event='true' aria-label='Go to product page'");let b=0!==s&&(4!==s||l)||0===s&&1===o&&i>0?`${g}
`:"";m+=`\n \n ${b}\n
`;const $=this.rt(m,t),y="undefined"!=typeof location&&/^\/products\/?/.test(location.pathname);let x=i>0&&!y?'
':"",_=this.options.admin?"image-loaded":"";const k=t.images&&t.images.standard_resolution?t.images.standard_resolution.url.replace(/"/g,"""):"";return`${x}${$}
`}rt(t,e){const i=parseInt(this.options.openIg,10);if(1===i)return`${t} `;if(4===i&&Array.isArray(e.tagged_products)&&e.tagged_products.length>0){const i=e.tagged_products[0];if(i?.handle){const e=this.options.admin?this.options.shopOrigin:window.location.hostname,n=this.options.admin?"/":Shopify?.routes?.root||"/",s=parseInt(i.variant,10),o=s>0?`?variant=${s}`:"",a=parseInt(i.gid,10)||0,d=this.options.admin?' target="_blank" rel="noopener"':"";return`${t} `}}return t}ot(t){this.o("SHOP_NOW");let e=this.options.admin?this.options.shopOrigin:window.location.hostname,i=this.options.admin?"/":Shopify.routes.root,n=this.options.admin?"":'style="pointer-events:all;"';return(t=t.slice(0,1)).map(t=>{let s=parseInt(t.variant)>0?"?variant="+parseInt(t.variant):"";return`\n \n ${t.image&&t.image.length>0?`
\n `:""}\n
\n
`}).join("")}dt(t){if(this.I(this.options.charge)&&parseInt(this.options.likes)>0&&parseInt(this.options.apiVersion)>4)return` \n ${this.D(t.likes.count,1)} `;{const e="video"===t.type?"video-icon-v3.png":"instagram-icon-v2.svg";return` `}}t(t,e,i,n=0,s=0){const o="instafeed-simple-popup"===i?"instafeed-tagged-buy-button-simple-popup ":"tagged-buy-button",a=parseInt(this.options.showPrices)>0?this.it(t.price,t.compare_price||0,t.price_max||0,t.compare_price_max||0):"",d=parseInt(this.options.showReviews)>0&&t.rating_count>0?this.nt(t.rating,t.rating_count):"",r=t.variant_title?""+t.variant_title+"
":"",l=t.image&&""!==t.image.trim()?t.image:"https://"+A+"/assets/img/image-placeholder-v2.png",c="ig"===t.source?"disabled":"",p="ig"===t.source?this.o("PRODUCT_FROM_IG"):this.o("DELETE"),u=this.options.admin&&this.I(this.options.charge),h=t.placement&&"object"==typeof t.placement?t.placement:{},f=h[String(s)]||h[0]||null,w=null!=f?.x_pct?f.x_pct:void 0!==t.x_pct&&null!==t.x_pct?t.x_pct:"",m=null!=f?.y_pct?f.y_pct:void 0!==t.y_pct&&null!==t.y_pct?t.y_pct:"",g="object"==typeof h&&null!==h?JSON.stringify(h).replace(/&/g,"&").replace(/"/g,"""):"{}",v=parseInt(t.variant)>0?"?variant="+parseInt(t.variant):"",b=y()?.locale??this.options.language;t.translations&&b in t.translations&&"title"in t.translations[b]&&""!==t.translations[b].title.trim()&&(t.title=t.translations[b].title);const $=this.options.addToCart&&parseInt(t.variant)>0&&!this.options.admin,I="instafeed-simple-popup"===i?"":$?this.o("ADD_TO_CART"):this.o("SHOP_NOW"),x=this.options.admin?"/":y()?.routes?.root??"/",_=`onclick="InstafeedAPI.eventTag('product_click', ${this.options.feedId}, ${t.gid});" href="//${window.location.hostname}${x}${t.handle}${v}"`,k=$?`role="button" href="#" onclick="event.preventDefault(); InstafeedAPI.eventTag('product_click', ${this.options.feedId}, ${t.gid}); InstafeedAPI.addToCart(this, ${parseInt(t.variant)}, '${I}', '${i}');" data-sold-out='${this.o("SOLD_OUT")}'`:_,S="instafeed-simple-popup"===i?$?"add-to-cart-button":"shop-now-button":"";let T,P;if(this.options.admin){const i=u?`\n \n ${this.o("PLACE")} \n `:"";T=`\n
${t.title}${r}
\n ${d}${a}\n
\n `,P=` `}else $?(T=`\n `,P=`\n \n `):(T=`\n `,P=`\n \n `);return``}H(t,e=document.body,i=null){const n=document.createElement("template");for(n.innerHTML=t;n.content.firstChild;)e.insertBefore(n.content.firstChild,i)}X(){if(window.instafeedModalsWrapperObserver)return;window.instafeedBodyObserverCounter=window.instafeedBodyObserverCounter||0;const t=new MutationObserver(()=>{if(window.instafeedBodyObserverCounter>=10)t.disconnect();else if(!document.body.lastElementChild.classList.contains("instafeed-modals-wrapper")){const t=document.querySelectorAll(".instafeed-modals-wrapper");t.length>0&&t.forEach(t=>{document.body.appendChild(t),window.instafeedBodyObserverCounter++})}});t.observe(document.body,{childList:!0}),window.instafeedModalsWrapperObserver=t}J(){document.querySelectorAll(`[data-instafeed-role-button], .${N}-video-control, .${N}-sound-button, .${N}-close-button, .${N}-post-control-button, .${N}-new-arrow, .${N}-carousel-arrow`).forEach(t=>{t.setAttribute("role","button")})}tt(){window.instafeedCarouselListeners||document.querySelector(".instafeed-post-image")&&(j.addListener(document,"swiped",function(t){if(!t.target.closest(".instafeed-post-image")||window.instafeedCarouselTransitioning)return;const e=t.target.closest(".instafeed-post-image"),i=e.querySelector(".instafeed-carousel-arrow-left"),n=e.querySelector(".instafeed-carousel-arrow-right");if("left"===t.detail.dir&&n){window.instafeedCarouselTransitioning=!0;const t=n.getAttribute("onclick").match(/['"]([^'"]+)['"]/)[1],e=parseInt(n.getAttribute("onclick").match(/,\s*(\d+)/)[1],10);window.InstafeedAPI.carouselMove(n,t,e,"right")}else if("right"===t.detail.dir&&i){window.instafeedCarouselTransitioning=!0;const t=i.getAttribute("onclick").match(/['"]([^'"]+)['"]/)[1],e=parseInt(i.getAttribute("onclick").match(/,\s*(\d+)/)[1],10);window.InstafeedAPI.carouselMove(i,t,e,"left")}}),window.instafeedCarouselListeners=!0)}Z(){j.addListener(document,"swiped",function(t){const e=document.getElementById(window.InstafeedAPI.settings.modalOpen);if(!e||!t.target.className.includes("instafeed-simple-popup"))return;const i={up:{selector:`.${N}-post-control-button.arrow-down`,direction:"next",transform:"translateY(100%)",containerTransform:"translateY(-100%)"},down:{selector:`.${N}-post-control-button.arrow-up`,direction:"prev",transform:"translateY(-100%)",containerTransform:"translateY(100%)"}}[t.detail.dir];if(i){const t=e.querySelector(i.selector);if(t){const n=t.getAttribute(`data-${N}-open-id`),s=document.getElementById(n);s&&(s.style.setProperty("display","flex","important"),s.style.transform=i.transform,s.style.opacity="1",requestAnimationFrame(()=>{const n="0.2s ease-out";e.style.transition=`transform ${n}, opacity ${n}`,s.style.transition=`transform ${n}`,e.style.transform=i.containerTransform,s.style.transform="translateY(0)",setTimeout(()=>{e.style.transition="",e.style.transform="",s.style.transition="",s.style.transform="",t.click()},200)}))}}window.lastSwipeEventInstafeed=t})}K(){document.querySelectorAll(".instafeed-simple-popup-product-list").forEach(t=>{let e,i,n=!1;j.addListener(t,"mousedown",function(s){s.stopPropagation(),n=!0,t.classList.add("grabbing"),window.InstafeedAPI.settings.isDragging=!0,e=s.pageX-t.offsetLeft,i=t.scrollLeft}),j.addListener(document,"mouseup",function(){n&&(n=!1,t.classList.remove("grabbing"),setTimeout(()=>{window.InstafeedAPI.settings.isDragging=!1},0))},{passive:!0}),j.addListener(t,"mousemove",function(s){if(!n)return;s.stopPropagation(),s.preventDefault();const o=2.5*(s.pageX-t.offsetLeft-e);t.scrollLeft=i-o},{passive:!1}),j.addListener(t,"touchstart",function(s){s.stopPropagation(),n=!0,t.classList.add("grabbing"),window.InstafeedAPI.settings.isDragging=!0,e=s.touches[0].pageX-t.offsetLeft,i=t.scrollLeft},{passive:!0}),j.addListener(document,"touchend",function(){n&&(n=!1,t.classList.remove("grabbing"),setTimeout(()=>{window.InstafeedAPI.settings.isDragging=!1},0))},{passive:!0}),j.addListener(document,"touchcancel",function(){n&&(n=!1,t.classList.remove("grabbing"),window.InstafeedAPI.settings.isDragging=!1)},{passive:!0}),j.addListener(t,"touchmove",function(s){if(!n)return;s.stopPropagation(),s.preventDefault();const o=2.5*(s.touches[0].pageX-t.offsetLeft-e);t.scrollLeft=i-o},{passive:!1})})}S(){const t=this.options.admin?"":`https://${O}`,e=window.location.pathname.includes("/products/"),i=window.location.pathname.includes("/collections/")||new URLSearchParams(window.location.search).get("collection")?.includes("/collections/");let n="",s="";if(e)n=window.location.pathname.split("/products/")[1];else if(i)if(window.location.pathname.includes("/collections/"))n=window.location.pathname.split("/collections/")[1];else{const t=new URLSearchParams(window.location.search).get("collection");n=t?.split("/collections/")[1]}n=n?.split(/[?/]/)[0]||"",["thankyou-485.myshopify.com","bellafitwear.myshopify.com","kv4cd6-ag.myshopify.com","bbpews-wu.myshopify.com"].includes(this.options.shopOrigin)&&n.length>0&&ShopifyAnalytics?.meta?.product?.id&&(n=ShopifyAnalytics?.meta?.product?.id,s="&handle_type=gid");const o=this.options.overrides.length>0?`&overrides=${this.options.overrides}`:"",a=this.options.forceUpdate?1:0;return`${t}/${E}/v${this.options.apiVersion}?limit=${this.options.picturesNeeded}&account=${this.options.shopOrigin}&fu=${a}&fid=${this.options.feedId}&hash=${this.options.hash}&locale=${this.options.locale}&handle=${n}${s}${o}`}R(t,e){return t.replace(/{{([\w[\].]+)}}/g,(t,i)=>{const n=this.O(e,i);return null!==n?n:""})}O(t,e){const i=(e=e.replace(/\[(\w+)\]/g,".$1")).split(".");for(const e of i){if(null===t||!(e in t))return null;t=t[e]}return t}I(t){return parseInt(t)>0}k(t){if(this.options.admin)return this.options.desktopPreview?4:2;const e=[{width:480,columns:2},{width:768,columns:3},{width:1024,columns:4},{width:1200,columns:5},{width:1440,columns:6},{width:1680,columns:7},{width:1920,columns:8}].find(e=>t=0;n--){const s=Math.pow(1e3,n+1);if(t<=-s||t>=s)return+(t/s).toFixed(e)+i[n]}return t}N(t){return new Date(1e3*t).toLocaleDateString(navigator.language,{month:"long",day:"numeric"})}_(t=!1){return!(!this.options.admin||this.options.desktopPreview||!1!==t)||(!this.options.admin||!this.options.desktopPreview||!1!==t)&&("merchantoftennis.myshopify.com"===y()?.shop?window.matchMedia("only screen and (max-width: 768px)").matches:window.matchMedia("only screen and (max-width: 1024px)").matches)}$(t){const e=new ResizeObserver(t=>{const i=t[0];i?.contentRect?.width>0&&(e.disconnect(),this.run(i.contentRect.width))});e.observe(t)}i(){if(window.instafeedCssLoaded)return;if(document.currentScript&&!document.currentScript.src.includes(P))return!1;const t=document.createElement("link");t.href=`https://${A}/cdn/${N}-${F}.css`,t.type="text/css",t.rel="stylesheet",t.media="screen,print",document.head.appendChild(t),window.instafeedCssLoaded=!0}B(){if(instafeedPopupsPreloaded)return!1;if(this.lt()||"going-natural-marketplace.myshopify.com"===y()?.shop)return!1;instafeedPopupsPreloaded=!0;const t=new IntersectionObserver((t,e)=>{t.forEach(t=>{t.isIntersecting&&(this.ct(),e.unobserve(t.target))})},{threshold:.1}),e=document.querySelector("#insta-feed, .instafeed-shopify");e&&t.observe(e)}lt(){if("connection"in navigator&&navigator.connection){const t=navigator.connection;if(!0===t.saveData)return!0;if("effectiveType"in t&&["slow-2g","2g","3g"].includes(t.effectiveType))return!0;if("downlink"in t&&"number"==typeof t.downlink&&t.downlink<1)return!0}return!1}ct(){const t=document.querySelectorAll("div.lightbox-instagram");let e=0;t.forEach(t=>{let i=0;t.querySelectorAll("video, img").forEach(t=>{setTimeout(()=>{if("VIDEO"===t.tagName)t.setAttribute("preload","metadata"),t.load();else{const e=t.getAttribute("data-instafeed-src");e&&(t.setAttribute("src",e),t.classList.add(N+"-lazy-image--handled"))}},e),e+=200+i,i+=50})})}U(){const t=document.querySelectorAll("."+N+"-lazy-image");if(!t.length||!("IntersectionObserver"in window))return void t.forEach(t=>this.ut(t));const e="rainbowoptx"===this.options.accountUsername?"600px 0px":"200px 0px",i=new IntersectionObserver((t,e)=>{t.forEach(t=>{t.isIntersecting&&(this.ht(),e.unobserve(t.target),this.ut(t.target))})},{rootMargin:e});t.forEach(t=>{t.classList.contains(N+"-lazy-image--handled")||i.observe(t)})}ut(t){const e=t.dataset.instafeedSrc;t.classList.contains(N+"-lazy-image--handled")||(t.classList.add(N+"-lazy-image--handled"),t.onerror=()=>{t.classList.remove(N+"-lazy-image--handled")},t.onload=()=>{const e=t.closest("."+N+"-new-layout-item");e&&e.classList.add("image-loaded")},t.src=e)}q(){const t=parseInt(this.options.autoplay);this.ft();const e=t=>t?.play(),i=t=>document.getElementById(`inline-video-${t}-${this.options.target}`),n=y()?.designMode&&navigator.userAgent.includes("Shopify Mobile"),s={rootMargin:"200px 0px"};if(1!==t||n){const o=document.querySelectorAll("video[data-poster]");let a=new IntersectionObserver(t=>{t.forEach(t=>{if(t.isIntersecting){this.ht();let e=t.target,i=e.getAttribute("data-poster");e.setAttribute("poster",i),a.unobserve(e)}})},s);o.forEach(t=>{a.observe(t)})}if(1===t&&this.I(this.options.charge)&&!n){const d=document.querySelectorAll('.auto-loop-videos[data-feed-id="'+this.options.feedId+'"]'),r=new IntersectionObserver((t,i)=>{t.forEach(t=>{t.isIntersecting&&(e(t.target),i.unobserve(t.target))})},s);d.forEach(t=>r.observe(t))}if(2===t&&this.I(this.options.charge)&&!n){let l=document.querySelectorAll(`.${N}-hover-layer[data-feed-id='${this.options.feedId}-video'], .${N}-overlay[data-feed-id='${this.options.feedId}-video']`);l&&0!==l.length||0!==parseInt(this.options.openIg)||(l=document.querySelectorAll(`.${N}-new-layout-item-container`)),l.forEach(t=>{t.style.opacity="1",t.style.background="transparent"}),l.forEach(t=>{const n=n=>{const s=t.getAttribute(`data-${N}-open-id`).split("-")[0],o=i(s);var a;n?(e(o),t.style.opacity=0):(a=o,a?.pause(),t.style.opacity=1)};j.addListener(t,"mouseover",()=>n(!0)),j.addListener(t,"mouseout",()=>n(!1)),j.addListener(t,"touchstart",()=>n(!0),{passive:!0}),j.addListener(t,"touchend",()=>n(!1),{passive:!0})})}if(3===t&&this.I(this.options.charge)&&!n){const c=Array.from(document.querySelectorAll('.auto-loop-videos[data-feed-id="'+this.options.feedId+'"]'));if(0===c.length)return;let p=!1,u=!1;const h=t=>t?.play(),f=t=>t?.pause();function w(t){if(p)return;p=!0,c.forEach((e,i)=>{i!==t&&(f(e),e.currentTime=0)});const e=c[t];e?(e.currentTime=0,e.muted=!0,h(e),p=!1):p=!1}c.forEach((t,e)=>{t.onended=()=>w((e+1)%c.length)});const m=new IntersectionObserver((t,e)=>{t.forEach(t=>{t.isIntersecting&&!u&&(u=!0,w(0),e.unobserve(t.target))})},{rootMargin:"200px 0px"});c[0]&&m.observe(c[0])}}ft(){Array.from(document.querySelectorAll('video[id^="video-"]')).filter(t=>t.id.includes(this.options.target)).forEach(t=>{t.onplay=()=>{t.muted=!window.InstafeedAPI.settings.sound,t.id.split("-").pop(),null===window.InstafeedAPI.settings.modalOpen&&t.pause()}})}ht(){if(window.InstafeedAPI.settings.feedViewed?.[this.options.feedId])return!1;window.InstafeedAPI.settings.feedViewed[this.options.feedId]=!0,window.InstafeedAPI.eventTag("feed_view",this.options.feedId)}et(){document.addEventListener("pointerdown",function(t){function e(t){let e=i-t.clientX;if(a&&console.log("deltaX",e),Math.abs(e)>5){s=!0;const a={dir:e>0?"left":"right",touchType:"mouse",fingers:1,xStart:parseInt(i,10),xEnd:parseInt(t.clientX,10),yStart:parseInt(n,10),yEnd:parseInt(t.clientY,10)},d=new CustomEvent(e>0?"swiped-left":"swiped-right",{bubbles:!0,cancelable:!0,detail:a});o.dispatchEvent(d)}}if(0!==t.button)return;let i=t.clientX,n=t.clientY,s=!1,o=t.target,a="mintt-studio-developers.myshopify.com"===y()?.shop;if(a&&console.log("e.target",t.target),!Array.from(o.classList).some(t=>t.includes("instafeed-hover-layer")||t.includes("instafeed-new-layout-item-container")))return!1;t.stopPropagation(),a&&(console.log("dragTarget",o),console.log("startX",i),console.log("startY",n)),o.style.cursor="grabbing",o.style.userSelect="none",document.addEventListener("pointermove",e),document.addEventListener("pointerup",function t(){document.removeEventListener("pointermove",e),document.removeEventListener("pointerup",t),s&&(window.InstafeedAPI.settings.hasSwiped=s),o.style.cursor="",o.style.userSelect=""})})}}}();!function t(){function e(t,e=!1){const n=document.getElementById(t);if(window.InstafeedAPI.settings.sliderIsPaused=!1,n){let t=document.getElementById("video-"+i);t&&t.pause();var s=document.querySelector(".instafeed-floating-visible video");s&&(s.muted=!window.InstafeedAPI.settings.sound),e||(document.body.classList.remove("instafeed-body-no-scroll"),document.documentElement.classList.remove("instafeed-body-no-scroll"));let o=!!e;window.InstafeedAPI.settings.previouslyFocusedElement&&window.InstafeedAPI.settings.previouslyFocusedElement.focus({preventScroll:o}),n.style.setProperty("display","none","important"),n.style.opacity=0,window.InstafeedAPI.settings.modalOpen=null,j.removeListener(window,"keydown",instafeedTrapFocusHandler,!1),j.removeListener(document.body,"touchmove",instafeedTouchScrollListener,{passive:!1})}}var i;j.addListener(document,"click",function(t){var n,s;if(window.InstafeedAPI.settings.isDragging||window.InstafeedAPI.settings.hasSwiped)return void(window.InstafeedAPI.settings.hasSwiped=!1);if("VIDEO"===t.target.tagName&&t.target.id.includes(window.InstafeedAPI.settings.modalOpen))return void window.InstafeedAPI.togglePlay();const o=t.target.closest(".instafeed-hotspot");if(o){const t=o.closest(".lightbox-instagram");return void(t&&f(t,o,!0))}const a=t.target.closest(".lightbox-instagram .tagged-products");if(a){const t=a.closest(".lightbox-instagram");t&&g(t,a,!0)}if(!t.target||!t.target.hasAttribute(`data-${N}-open-id`)&&!t.target.hasAttribute(`data-${N}-close-id`))return!1;if(n=t.target.hasAttribute(`data-${N}-open-id`)?t.target.getAttribute(`data-${N}-open-id`):t.target.getAttribute(`data-${N}-close-id`),s=document.getElementById("video-"+n),t.target.hasAttribute(`data-${N}-open-id`)){const t=document.getElementById(n);if(document.activeElement.classList.contains(`${N}-new-layout-item-container`)&&(window.InstafeedAPI.settings.previouslyFocusedElement=document.activeElement),t){const i=t.querySelector(".instafeed-cart-icon");!M.includes(window.location.hostname)&&i&&fetch(window.Shopify.routes.root+"cart.js").then(t=>t.json()).then(t=>{i.setAttribute("data-count",t.item_count)}).catch(t=>{console.error("Error:",t)});let o=!1;if(window.InstafeedAPI.settings.modalOpen&&(o=!0,e(window.InstafeedAPI.settings.modalOpen,o)),window.InstafeedAPI.settings.modalOpen=n,t.style.setProperty("display","flex","important"),t.style.opacity=1,document.querySelectorAll('video[id^="inline-video-"]').forEach(function(t){t.muted=!0}),window.InstafeedAPI.settings.sliderIsPaused=!0,document.body.classList.add("instafeed-body-no-scroll"),document.documentElement.classList.add("instafeed-body-no-scroll"),t.querySelector(".instafeed-simple-popup")&&j.addListener(document.body,"touchmove",instafeedTouchScrollListener,{passive:!1}),s){const t=document.getElementById("video-spinner-"+n);t.style.display="block",s.play().then(()=>{t.style.display="none"})}!function d(t){let e=`.${N}-new-arrow, .${N}-close-button`;window.matchMedia("only screen and (max-width: 1024px)").matches&&(e=`.${N}-close-button, .tagged-buy-button, .${N}-sound-button, .${N}-post-control-button`);const{firstFocusableElement:i,lastFocusableElement:n}=function s(t,e){const i=t.querySelectorAll(e);return{firstFocusableElement:i[0],lastFocusableElement:i[i.length-1]}}(t,e);instafeedTrapFocusHandler=t=>{!function e(t,i,n){("Tab"===t.key||9===t.keyCode)&&(t.shiftKey?t.target===i&&(n.focus(),t.preventDefault()):t.target===n&&(i.focus(),t.preventDefault()))}(t,i,n)},j.addListener(window,"keydown",instafeedTrapFocusHandler,!1),i&&i.focus({preventScroll:!0})}(t);const a=t.querySelector(".lightbox-instagram");window.InstafeedAPI.renderHotspotsForLightboxWithStability(a);const d=t.querySelector("[data-picture-id]"),r=d?d.getAttribute("data-picture-id"):"";window.InstafeedAPI.eventTag("modal_open",n,0,r)}}t.target.hasAttribute(`data-${N}-close-id`)&&e(n),i=n},{passive:!0}),j.addListener(window,"keydown",t=>{var i,n,s;const{key:o}=t;if(!document.getElementById("video-"+window.InstafeedAPI.settings.modalOpen)||" "!==o&&"Spacebar"!==o&&"Space"!==t.code||"INPUT"===t.target.tagName||"TEXTAREA"===t.target.tagName||(t.preventDefault(),window.InstafeedAPI.togglePlay()),"Escape"===o)window.InstafeedAPI.settings.modalOpen&&e(window.InstafeedAPI.settings.modalOpen);else if("Enter"===t.key){const t=document.activeElement;("true"===t.getAttribute("data-instafeed-keydown-event")||t.classList.contains(`${N}-post-control-button`)||t.classList.contains(`${N}-sound-button`)||t.classList.contains(`${N}-video-control`)||t.classList.contains(`${N}-close-button`)||t.classList.contains(`${N}-carousel-arrow`)||t.classList.contains(`${N}-new-arrow`))&&t.click()}(i=document.getElementById(window.InstafeedAPI.settings.modalOpen))&&(n="","ArrowLeft"===o?n=`.${N}-new-arrow.prev`:"ArrowRight"===o&&(n=`.${N}-new-arrow.next`),n&&(s=i.querySelector(n))&&s.click())},{passive:!1})}(),M.includes(window.location.hostname)&&(document.addEventListener("product-tagged",v),document.addEventListener("product-deleted",v),document.addEventListener("product-placed",v)),j.addListener(document,"mouseover",function(t){const e=b(t);"hotspot"===e.kind&&e.lightbox&&f(e.lightbox,e.element,!1),"card"===e.kind&&e.lightbox&&!e.element.contains(t.relatedTarget)&&g(e.lightbox,e.element,!1)},{passive:!0}),j.addListener(document,"mouseout",function(t){const e=b(t);if("hotspot"===e.kind&&e.lightbox){const i=t.relatedTarget?.closest?.(".instafeed-hotspot");if(i&&i.closest(".lightbox-instagram")===e.lightbox)return;return void w(e.lightbox)}if("card"===e.kind&&e.lightbox&&!e.element.contains(t.relatedTarget)){const i=e.element.getAttribute("data-tagging-id");i&&t.relatedTarget?.closest?.('.instafeed-hotspot[data-tagging-id="'+CSS.escape(i)+'"]')||w(e.lightbox)}},{passive:!0}),function t(){function e(){const t=new URLSearchParams(window.location.search).get("instafeed_post");if(t){const e=document.querySelector('[data-instafeed-open-id^="'+t+'-"]');if(e){e.click();const t=new URL(window.location);return t.searchParams.delete("instafeed_post"),void window.history.replaceState({},"",t)}}}document.addEventListener("instafeedAppLoaded",e),window.addEventListener("popstate",e)}(),function t(e,i){function n(t,e){if(c){var i={dir:t.replace(/swiped-/,""),touchType:e.touchType||"direct",fingers:p,xStart:parseInt(o,10),xEnd:parseInt(e.clientX||-1,10),yStart:parseInt(a,10),yEnd:parseInt(e.clientY||-1,10)};c.dispatchEvent(new CustomEvent("swiped",{bubbles:!0,cancelable:!0,detail:i})),c.dispatchEvent(new CustomEvent(t,{bubbles:!0,cancelable:!0,detail:i}))}}function s(t,e,n){for(;t&&t!==i.documentElement;){const i=t.getAttribute(e);if(i)return i;t=t.parentNode}return n}let o=null,a=null,d=null,r=null,l=null,c=null,p=0,u=!1,h=0,f=!1,w=!1;i.addEventListener("touchstart",function(t){"true"!==t.target.getAttribute("data-swipe-ignore")&&(c=t.target,l=Date.now(),o=t.touches[0].clientX,a=t.touches[0].clientY,d=0,r=0,p=t.touches.length,u=!0,f=!1,w=!1)},{passive:!0}),i.addEventListener("touchmove",function(t){var e,i,l;if(!u||!o||!a)return;if(e=t.touches[0].clientX,i=t.touches[0].clientY,d=o-e,r=a-i,(l=Date.now())-h<300)return;const p=parseInt(s(c,"data-swipe-threshold","50"),10);f||w||(Math.abs(d)>Math.abs(r)&&Math.abs(d)>10?f=!0:Math.abs(r)>Math.abs(d)&&Math.abs(r)>10&&(w=!0)),f&&"true"===s(c,"data-instafeed-prevent-touch-scroll","false")&&t.preventDefault(),f&&Math.abs(d)>p?(n(d>0?"swiped-left":"swiped-right",t.touches[0]),u=!1,h=l):w&&Math.abs(r)>p&&(n(r>0?"swiped-up":"swiped-down",t.touches[0]),u=!1,h=l)},{passive:!1}),i.addEventListener("touchend",function(){u=!1,f=!1,w=!1,o=null,a=null,l=null},{passive:!0})}(window,document),window.instafeedFeedsLoaded=window.instafeedFeedsLoaded||[],window.instafeedCssLoaded=window.instafeedCssLoaded||!1,window.instafeedCarouselListeners=window.instafeedCarouselListeners||!1,window.instafeedCarouselTransitioning=window.instafeedCarouselTransitioning||!1,window.instafeedModalsWrapperObserver=window.instafeedModalsWrapperObserver||!1,window.instafeedScrollIntervals=window.instafeedScrollIntervals||{},window.instafeedSlideSpeed=window.instafeedSlideSpeed||6e3,window.instafeedContinuousSlideSpeed=window.instafeedContinuousSlideSpeed||5990,window.instafeedPopupsPreloaded=window.instafeedPopupsPreloaded||!1,window.instafeedTrapFocusHandler=window.instafeedTrapFocusHandler||!1,window.instafeedTouchScrollListener=window.instafeedTouchScrollListener||function(t){t.preventDefault()},window.InstafeedAPI={version:F,settings:{instances:{},version:F,translations:{},sound:!1,dynamicSliderArrows:["thelodge.myshopify.com"],analytics:!1,modalOpen:null,isDragging:!1,hasSwiped:!1,feedViewed:{},previouslyFocusedElement:null,carousels:{},sliderRowSize:{},sliderStepSize:{},sliderIsPaused:!1,sliderNumVisibleImages:{},sliderState:{},totalImages:{}},toggleSound:n,togglePlay:s,eventTag:t,addToCart:i,carouselMove:o,sliderMove:$,renderHotspotsForLightbox:l,renderHotspotsForLightboxWithStability:c,hotspotUtils:{clamp:x,roundCoordinate:_,getObjectFitBounds:k,clientPointToPercent:S,percentToClientPoint:T}};if (document.getElementById('insta-feed') !== null) { var feed = new Instafeed({"hash":"a77d37bb1bbda4e83995f234ad90daff","key":"instafeed-5e2a6455868efd2d38f247ab6709dd32","apiVersion":6,"shopOrigin":"muma-co.myshopify.com","title":"","openIg":3,"space":1,"corners":0,"likes":0,"showFollowers":0,"showProducts":0,"layout":7,"format":5,"sliderBehavior":1,"instagramLinks":0,"loadingAnimation":0,"carouselProductTags":0,"showPrices":0,"showReviews":0,"analytics":0,"showHalfPosts":0,"hideUsernames":0,"addToCart":0,"filter":"","taggedPosts":0,"columns":100,"columnsMobile":100,"rows":4,"rowsMobile":4,"autoplay":0,"rowsLimit":4,"abTest":0,"feedId":0,"charge":0}); feed.run(); }return instafeedLoad;})();window.addEventListener('resize',(a=>{let b;return()=>{clearTimeout(b),b=setTimeout(()=>{window.innerWidth!==a&&(a=window.innerWidth,instafeedApp())},100)}})(window.innerWidth));document.addEventListener('shopify:section:load',()=>{instafeedApp()});