var instafeedApp=(function instafeedLoad(){/*! * Copyright (c) 2023 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. */const e="instafeed.nfcube.com",t="cdn.nfcube.com",s="11.7.1",i="feed",o="insta-feed",n=".instafeed-lightbox",a="instafeed",r=!1;window.instafeedEvents=window.instafeedEvents||[];class d{constructor(){this.listeners=window.instafeedEvents=window.instafeedEvents||[],this.debugMode=!1}addListener(e,t,s,i={}){e.addEventListener(t,s,i),this.listeners.push({element:e,event:t,handler:s}),this.debugMode&&(console.log(`Added listener for ${t}`),console.log("Listeners",this.listeners))}removeListener(e,t,s){e.removeEventListener(t,s),this.listeners=this.listeners.filter((i=>!(i.element===e&&i.event===t&&i.handler===s))),this.debugMode&&(console.log(`Removed listener for ${t}`),console.log("Listeners",this.listeners))}clearAllListeners(){this.listeners.forEach((({element:e,event:t,handler:s})=>{e.removeEventListener(t,s)})),this.listeners=[],this.debugMode&&console.log("All listeners have been removed")}}const l=new d;var Instafeed=function(){function Instafeed(t){this.translations={en:{SHOP_NOW:"Shop now",TAG_PRODUCTS:"Tag products",TAGGED_BY:"Tagged by {username}",VIEW_ON_INSTAGRAM:"View on Instagram",HANG_ON:"Hang on we are processing your feed, this might take a couple of minutes ☕",DELETE:"Delete"},"pt-PT":{SHOP_NOW:"Comprar agora",TAG_PRODUCTS:"Identificar produtos",TAGGED_BY:"Marcado por {username}",VIEW_ON_INSTAGRAM:"Ver no Instagram",HANG_ON:"Aguarde um momento, estamos a processar o seu feed, isto pode demorar alguns minutos ☕",DELETE:"Apagar"},"pt-BR":{SHOP_NOW:"Comprar agora",TAG_PRODUCTS:"Marcar produtos",TAGGED_BY:"Marcado por {username}",VIEW_ON_INSTAGRAM:"Ver no Instagram",HANG_ON:"Aguarde um momento, estamos processando seu feed, isso pode levar alguns minutos ☕",DELETE:"Delete"},es:{SHOP_NOW:"Comprar ahora",TAG_PRODUCTS:"Etiquetar productos",TAGGED_BY:"Etiquetado por {username}",VIEW_ON_INSTAGRAM:"Ver en Instagram",HANG_ON:"Espera un momento, estamos procesando tu feed, esto podría tardar unos minutos ☕",DELETE:"Eliminar"},"ja-JP":{SHOP_NOW:"今すぐ購入",TAG_PRODUCTS:"商品にタグを付ける",TAGGED_BY:"{username}によってタグ付けされました",VIEW_ON_INSTAGRAM:"Instagramで見る",HANG_ON:"少々お待ちください、フィードを処理中です。これには数分かかる場合があります ☕",DELETE:"削除"},fr:{SHOP_NOW:"Acheter",TAG_PRODUCTS:"Étiqueter les produits",TAGGED_BY:"Tagué par {username}",VIEW_ON_INSTAGRAM:"Afficher sur Instagram",HANG_ON:"Patientez, nous traitons votre flux, cela pourrait prendre quelques minutes ☕",DELETE:"Supprimer"},de:{SHOP_NOW:"Jetzt shoppen",TAG_PRODUCTS:"Produkte taggen",TAGGED_BY:"Getaggt von {username}",VIEW_ON_INSTAGRAM:"Auf Instagram ansehen",HANG_ON:"Einen Moment bitte, wir verarbeiten deinen Feed, das könnte einige Minuten dauern ☕",DELETE:"Löschen"},sv:{SHOP_NOW:"Handla nu",TAG_PRODUCTS:"Tagga produkter",TAGGED_BY:"Taggad av {username}",VIEW_ON_INSTAGRAM:"Visa på Instagram",HANG_ON:"Vänta, vi behandlar ditt flöde, detta kan ta några minuter ☕",DELETE:"Radera"},it:{SHOP_NOW:"Acquista ora",TAG_PRODUCTS:"Tagga prodotti",TAGGED_BY:"Taggato da {username}",VIEW_ON_INSTAGRAM:"Visualizza su Instagram",HANG_ON:"Aspetta, stiamo elaborando il tuo feed, potrebbe richiedere qualche minuto ☕",DELETE:"Elimina"},da:{SHOP_NOW:"Shop nu",TAG_PRODUCTS:"Tag produkter",TAGGED_BY:"Tagget af {username}",VIEW_ON_INSTAGRAM:"Se på Instagram",HANG_ON:"Vent venligst, vi behandler dit feed, det kan tage et par minutter ☕",DELETE:"Slet"},nb:{SHOP_NOW:"Handle nå",TAG_PRODUCTS:"Tagge produkter",TAGGED_BY:"Taggede av {username}",VIEW_ON_INSTAGRAM:"Vis på Instagram",HANG_ON:"Vent litt, vi behandler din feed, dette kan ta noen minutter ☕",DELETE:"Slett"},nl:{SHOP_NOW:"Nu winkelen",TAG_PRODUCTS:"Producten taggen",TAGGED_BY:"Getagd door {username}",VIEW_ON_INSTAGRAM:"Bekijk op Instagram",HANG_ON:"Even geduld alstublieft, we verwerken je feed, dit kan een paar minuten duren ☕",DELETE:"Verwijderen"}},this.availableLanguages=["en","es","de","fr","sv","da","it","nl","nb","ja-JP","pt-PT","pt-BR"],this.options={target:o,locale:"en",showLoading:!0,forceUpdate:!1,key:"",overrides:"",picturesLoaded:0,picturesNeeded:0,abtest:0,admin:window.location.hostname===e},"undefined"!=typeof Shopify&&Shopify.locale&&this.availableLanguages.includes(Shopify.locale)&&(this.options.locale=Shopify.locale),Object.assign(this.options,t),this.options.admin||this._loadCss();document.querySelectorAll(n).forEach((e=>{e.parentNode.removeChild(e)}))}return Instafeed.prototype.translate=function(e){const t=this.options.locale;return this.translations[t]&&this.translations[t][e]?this.translations[t][e]:e},Instafeed.prototype.run=function(){var t=document.getElementById(this.options.target);if(0===t.clientWidth&&parseInt(this.options.autoLayout)>0)return this._checkClientWidth(this,t),!1;this.options.corners=50===parseInt(this.options.corners)?"50%":this.options.corners+"px",!this._validateCharge(this.options.charge)&&!this.options.admin&&parseInt(this.options.rows)>2&&parseInt(this.options.abtest)>0&&(this.options.rows=this.options.abtest),parseInt(this.options.autoLayout)>0?(this.options.picturesNeeded=this.options.rows*this._getAutoColumns(t.clientWidth),this._isMobileDevice()&&this._validateCharge(this.options.charge)&&(this.options.picturesNeeded=this.options.rowsMobile*this._getAutoColumns(t.clientWidth))):this._isMobileDevice()&&this._validateCharge(this.options.charge)?this.options.picturesNeeded=this.options.rowsMobile*this.options.columnsMobile:this.options.picturesNeeded=this.options.rows*this.options.columns,this.options.admin&&this.options.showLoading&&(t.innerHTML='
'+this.translate("HANG_ON")+""),!this.options.admin&&parseInt(this.options.loadingAnimation)>0&&(t.innerHTML='');const s=this;Date.now();return fetch(this._buildUrl()).then((e=>{if(!e.ok)throw new Error(`${e.status} ${e.statusText}`);return e.json()})).then((e=>{try{s.parse(e)}catch(e){console.error("Parse function error:",e.message)}})).catch((e=>{if(console.log("Fetch error:",e.message),this.options.admin){this.options.error.call(this,{meta:{code:204,username:"",error_message:"Taking a bit longer to fetch your feed, please refresh this page in a couple of minutes."}})}})).finally((()=>{Date.now()})),!0},Instafeed.prototype.parse=function(t){const s=document.getElementById(this.options.target);if(!s)return!1;if("object"!=typeof t)throw new Error("Invalid JSON response");const{meta:{code:i,error_message:o}}=t,n=parseInt(i,10);if(s.innerHTML="",200!==n)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);var r=t.data,d=0,p=this._geModalTemplate(),c="",u=2===parseInt(this.options.openIg)?"simple-popup":"",h=2===parseInt(this.options.openIg)?"instafeed-tagged-buy-button-simple-popup":"tagged-buy-button";for(d=0,len=r.length;d1){parseInt(this.options.showProducts)<2&&g.hasOwnProperty("tagged_products")&&g.tagged_products.length>0&&this._validateCharge(this.options.charge)&&g.tagged_products.forEach((t=>{let s="";parseInt(t.variant)>0&&(s="?variant="+parseInt(t.variant));let i="undefined"!=typeof Shopify&&Shopify.locale?Shopify.locale:this.options.locale;var o,n;t.translations&&i in t.translations&&"title"in t.translations[i]&&""!==t.translations[i].title.trim()&&(t.title=t.translations[i].title),this.options.admin?(o="
"+t.title+"
",n="
"+t.title+"
"):(o="
"+t.title+"
",n="
"+t.title+"
"),y+="
"+n+"
"+o+"
"}));var w="",b="",I="";if(g.carousel){const e=this.options.feedId;instafeedSettings.carousels[e]||(instafeedSettings.carousels[e]={}),instafeedSettings.carousels[e][d]=g.carousel.map((e=>e.thumbnail_url?e.thumbnail_url:e.media_url));let t="";g.carousel.forEach(((s,i)=>{t+=``})),I=`\n \n \n \n `}if("video"===g.type&&g.hasOwnProperty("videos")){w=a+"-video",b="
",imageFullHtml=I+"'}else imageFullHtml=I+"Instagram post with the caption: "+this._escapeHtml(this._getObjectProperty(g,"caption.text").substring(0,64))+"...";var _=1===this.options.picturesLoaded?Math.min(this.options.picturesNeeded,r.length):this.options.picturesLoaded-1,S=this.options.picturesLoaded===this.options.picturesNeeded||this.options.picturesLoaded===r.length?1:this.options.picturesLoaded+1;c+=this._makeTemplate(p,{model:g,id:this.options.picturesLoaded,fullId:g.id,minusId:_,plusId:S,link:g.link,image:v.url,video:w,tagged_username:g.user.username.length>0?"
"+this.translate("TAGGED_BY").replace("{username}","@"+g.user.username+"
"):"",username:t.meta.username,fullName:t.meta.full_name,userPicture:5===this.options.apiVersion&&parseInt(this.options.charge)>0?f:"https://"+e+"/assets/img/logo-instagram-transparent.png",imageFullHtml:imageFullHtml,soundToggle:b,taggedProduct:y,date:this._timeConverter(g.created_time),caption:this._escapeHtml(this._getObjectProperty(g,"caption.text")),likes:g.likes.count>1?" "+this._shortenLargeNumber(g.likes.count,1)+" \x3c!--❞ {{comments}}--\x3e":"",comments:this._shortenLargeNumber(g.comments.count,1),location:this._getObjectProperty(g,"location.name")})}if(this.options.picturesLoaded>=this.options.picturesNeeded||t.data.length===this.options.picturesLoaded)break}this._appendHtmlToParent(c);var E=0;if(E=parseInt(this.options.autoLayout)>0?parseFloat(100/this._getAutoColumns(s.clientWidth)).toFixed(2):this._isMobileDevice()&&this._validateCharge(this.options.charge)?parseFloat(100/this.options.columnsMobile).toFixed(2):parseFloat(100/this.options.columns).toFixed(2),instafeedSettings.sliderNumVisibleImages[this.options.feedId]=parseInt(Math.round(100/E)),instafeedSettings.totalImages[this.options.feedId]=this.options.picturesLoaded,s.innerHTML+=this._generateLayoutHTML(r,this._escapeHtml),this._setNumVisibleImages(),clearInterval(instafeedScrollIntervals[this.options.feedId]),6===parseInt(this.options.layout)){const e=document.querySelector('.instafeed-new-layout-wrapper[data-feed-id="'+this.options.feedId+'"]'),t=document.querySelector('.instafeed-new-layout-container[data-feed-id="'+this.options.feedId+'"]');e.style.display="grid",t.style.height="unset",e.style.gridTemplateColumns="repeat("+instafeedSettings.sliderNumVisibleImages[this.options.feedId]+", 1fr)"}else this._isMobileDevice()&&(l.addListener(s,"swiped-left",(e=>{instafeedSliderMove(1,this.options.feedId)})),l.addListener(s,"swiped-right",(e=>{instafeedSliderMove(-1,this.options.feedId)}))),instafeedSettings.sliderState={},this.options.sliderBehavior>1&&(instafeedScrollIntervals[this.options.feedId]=setInterval((()=>{instafeedSliderMove(1,this.options.feedId)}),instafeedSlideSpeed));this._setFeedHeader(m,f),this._changeMobileDOM(),this._enableLazyLoading(),parseInt(this.options.autoplay,10)>0&&this._observeAndPlayVideos(),parseInt(this.options.openIg,10)>1&&this._popupsPreloadTrigger(),2===parseInt(this.options.openIg,10)&&this._isMobileDevice()&&this._addSwipePopupEvents();const $=new CustomEvent("instafeedAppLoaded");return document.dispatchEvent($),instafeedFeedsLoaded.push(this.options.feedId),!0},Instafeed.prototype._geModalTemplate=function(){let t="",s=2===parseInt(this.options.openIg)?"simple-popup":"";var i=this._validateCharge(this.options.charge)&&parseInt(this.options.likes)>0&&4!==parseInt(this.options.apiVersion)?i="{{likes}}":"",o=1===parseInt(this.options.taggedPosts)||4===parseInt(this.options.taggedPosts)?"{{tagged_username}}":"",n=this.options.admin?"
":"";t="
";var r="";2===parseInt(this.options.openIg,10)&&(r=n+"
{{taggedProduct}}
"),t+="
",t},Instafeed.prototype._changeMobileDOM=function(){if(this._isMobileDevice(!0)){document.querySelectorAll("."+a+"-post-image").forEach((e=>{const t=e.nextElementSibling,s=t?t.querySelector("."+a+"-header"):null;s&&e.parentNode.insertBefore(s,e)}))}},Instafeed.prototype._setFeedHeader=function(e,t){const s=document.getElementById(this.options.target),i=this._validateCharge(this.options.charge)&&5===parseInt(this.options.apiVersion)&&(1===parseInt(this.options.showFollowers)||3===parseInt(this.options.showFollowers)),o=this._validateCharge(this.options.charge)&&5===parseInt(this.options.apiVersion)&&parseInt(this.options.showFollowers)>1,n=i?`

${this._shortenLargeNumber(e)} followers

`:"",r=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=r&&0===parseInt(this.options.feedId)?instafeedLocalTitle:window["instafeed"+this.options.feedId+"Title"],l=this.options.title.length>0||r;let p="";if(o&&(p+=``),l){p+=`

${r?d:this.options.title}

`}i&&(p+=n),(l||i)&&this._appendHtmlToParent(p,s,s.firstChild)},Instafeed.prototype._setNumVisibleImages=function(){const e=document.getElementById(this.options.target),t=parseFloat(e.offsetWidth.toFixed(2)),s=parseFloat((t/instafeedSettings.sliderNumVisibleImages[this.options.feedId]*(parseInt(this.options.space)/100)).toFixed(2)),i=parseInt(instafeedSettings.sliderNumVisibleImages[this.options.feedId]-1),o=parseFloat((i*s).toFixed(2)),n=parseFloat((t-o).toFixed(2)),r=parseFloat((n/instafeedSettings.sliderNumVisibleImages[this.options.feedId]).toFixed(2)),d=1===parseInt(this.options.format)?parseFloat((r*(16/9)).toFixed(2)):2===parseInt(this.options.format)?parseFloat((r*(5/4)).toFixed(2)):3===parseInt(this.options.format)?parseFloat((r*(3/4)).toFixed(2)):parseFloat(r.toFixed(2));if(document.querySelectorAll(`.${a}-new-layout-item[data-feed-id="${this.options.feedId}"]`).forEach((e=>{e.style.width=`${r}px`,e.style.height=`${d}px`})),1===parseInt(this.options.showProducts,10)&&this._validateCharge(this.options.charge)){if(d>400){document.querySelectorAll(".instafeed-product-item img").forEach((e=>{e.style.display="block"}))}if(d>265){document.querySelectorAll(".instafeed-product-item button").forEach((e=>{e.style.display="block"}))}}const l=document.querySelector(`.${a}-new-layout-container[data-feed-id="${this.options.feedId}"]`);l.style.width=`${t}px`,l.style.height=`${d}px`,document.querySelector(`.${a}-new-layout-wrapper[data-feed-id="${this.options.feedId}"]`).style.gap=`${s}px`,instafeedSettings.sliderStepSize[this.options.feedId]=0===this.options.sliderBehavior||2===this.options.sliderBehavior?t+s:r+s,instafeedSettings.sliderRowSize[this.options.feedId]=t+s},Instafeed.prototype._generateLayoutHTML=function(e){let t="",s=0;for(let i of e)if(s++,t+=this._imageTemplate(i,s),s>=this.options.picturesNeeded||e.length===s)break;let i="";return s>instafeedSettings.sliderNumVisibleImages[this.options.feedId]&&this.options.sliderBehavior<=1&&7===parseInt(this.options.layout)&&(i=`\n \n \n `),`\n
\n
\n ${t}\n
\n ${i}\n
`},Instafeed.prototype._imageTemplate=function(t,s){const i=parseInt(this.options.openIg,10),o=parseInt(this.options.showProducts,10);let n=t.images.standard_resolution,r=this._escapeHtml(t.caption.text).substring(0,64),d=1===o&&t.hasOwnProperty("tagged_products")&&t.tagged_products.length>0&&this._validateCharge(this.options.charge)?this._generateProductBox(t.tagged_products):"",l=d.length>0?"inline-product":"",p="video"===t.type&&parseInt(this.options.autoplay,10)>0&&this._validateCharge(this.options.charge)?``:`Instagram post with the caption: '${r}...'`,c="inline-product"===l?`
${d}
`:`
${this._generateIcon(t)}
`,u=i>1?"tabindex='0' aria-haspopup='true' aria-label='open post'":"",h=0!==i?`
${c}
`:"";p+=`\n
\n ${h}\n
`;const g=this._generatePostUrl(p,t,s);return`
${g}
`},Instafeed.prototype._generatePostUrl=function(e,t,s){return 1===parseInt(this.options.openIg,10)?`${e}`:e},Instafeed.prototype._generateProductBox=function(e){let t=this.translate("SHOP_NOW"),s=this.options.admin?this.options.shopOrigin:window.location.hostname,i=this.options.admin?"/":Shopify.routes.root,o=this.options.admin?"":'style="pointer-events:all;"';return(e=e.slice(0,1)).map((e=>{let n=parseInt(e.variant)>0?"?variant="+parseInt(e.variant):"";return`\n `})).join("")},Instafeed.prototype._generateIcon=function(t){if(parseInt(this.options.likes)>0&&5===parseInt(this.options.apiVersion))return`\n ${this._shortenLargeNumber(t.likes.count,1)}`;{const s="video"===t.type?"video-icon-v3.png":"instagram-icon-v2.svg";return``}},Instafeed.prototype._appendHtmlToParent=function(e,t=document.body,s=null){const i=document.createElement("template");for(i.innerHTML=e;i.content.firstChild;)t.insertBefore(i.content.firstChild,s)},Instafeed.prototype._addSwipePopupEvents=function(){l.addListener(document,"swiped",(function(e){var t=document.getElementById(instafeedSettings.modalOpen);if(t&&e.target.className.includes("simple-popup")){var s="";if("up"===e.detail.dir?s=`.${a}-new-arrow.prev`:"down"===e.detail.dir&&(s=`.${a}-new-arrow.next`),s){var i=t.querySelector(s);i&&i.click()}}}))},Instafeed.prototype._buildUrl=function(){const t=window.location.pathname.includes("/products/")?window.location.pathname.split("/products/")[1]:"",s=t&&t.length>0?`&handle=${t}`:"",o=this.options.overrides.length>0?`&overrides=${this.options.overrides}`:"",n=this.options.forceUpdate?1:0;return`https://${e}/${i}/v${this.options.apiVersion}?limit=${this.options.picturesNeeded}&account=${this.options.shopOrigin}&fu=${n}&fid=${this.options.feedId}&hash=${this.options.hash}&locale=${this.options.locale}${s}${o}`},Instafeed.prototype._makeTemplate=function(e,t){return e.replace(/{{([\w[\].]+)}}/g,((e,s)=>{const i=this._getObjectProperty(t,s);return null!==i?i:""}))},Instafeed.prototype._getObjectProperty=function(e,t){const s=(t=t.replace(/\[(\w+)\]/g,".$1")).split(".");for(const t of s){if(null===e||!(t in e))return null;e=e[t]}return e},Instafeed.prototype._validateCharge=function(e){return parseInt(e)>0},Instafeed.prototype._getAutoColumns=function(e){return e<480?2:e<768?3:e<1024?4:e<=1200?5:6},Instafeed.prototype._escapeHtml=function(e){return e&&(e=e.replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'")),e},Instafeed.prototype._shortenLargeNumber=function(e,t){const s=["k","M","G","T","P","E","Z","Y"];for(let i=s.length-1;i>=0;i--){const o=Math.pow(1e3,i+1);if(e<=-o||e>=o)return+(e/o).toFixed(t)+s[i]}return e},Instafeed.prototype._timeConverter=function(e){return new Date(1e3*e).toLocaleDateString(navigator.language,{month:"long",day:"numeric"})},Instafeed.prototype._isMobileDevice=function(e=!1){return!(!this.options.admin||this.options.desktopPreview||!1!==e)||(!this.options.admin||!this.options.desktopPreview||!1!==e)&&window.matchMedia("only screen and (max-width: 768px)").matches},Instafeed.prototype._checkClientWidth=function(e,t){0===t.clientWidth?setTimeout((()=>{e._checkClientWidth(e,t)}),100):e.run()},Instafeed.prototype._loadCss=function(){if(document.currentScript&&!document.currentScript.src.includes(t)&&!document.currentScript.src.includes(e))return!1;const i=document.createElement("link");i.href=`https://${e}/cdn/${a}-${s}.css`,i.type="text/css",i.rel="stylesheet",i.media="screen,print",document.head.appendChild(i)},Instafeed.prototype._popupsPreloadTrigger=function(){if(instafeedPopupsPreloaded)return!1;instafeedPopupsPreloaded=!0;const e=new IntersectionObserver(((e,t)=>{e.forEach((e=>{e.isIntersecting&&(this._popupsPreload(),t.unobserve(e.target))}))}),{threshold:.1}),t=document.querySelector("#insta-feed, .instafeed-shopify");t&&e.observe(t)},Instafeed.prototype._popupsPreload=function(){const e=document.querySelectorAll("div.lightbox-instagram");let t=0;e.forEach((e=>{let s=0;e.querySelectorAll("video, img").forEach(((e,i)=>{setTimeout((()=>{if("VIDEO"===e.tagName)e.setAttribute("preload","auto"),e.load();else{const t=e.getAttribute("data-instafeed-src");t&&(e.setAttribute("src",t),e.classList.add(a+"-lazy-image--handled"))}}),t),t+=200+s,s+=50}))}))},Instafeed.prototype._enableLazyLoading=function(){const e=document.querySelectorAll("."+a+"-lazy-image");if(!e.length||!("IntersectionObserver"in window))return void e.forEach((e=>this.preloadImage(e)));const t=new IntersectionObserver(((e,t)=>{e.forEach((e=>{e.isIntersecting&&(t.unobserve(e.target),this.preloadImage(e.target))}))}),{rootMargin:"100px 0px",threshold:.01});e.forEach((e=>{e.classList.contains(a+"-lazy-image--handled")||t.observe(e)}))},Instafeed.prototype.preloadImage=function(e){const t=e.dataset.instafeedSrc;e.classList.contains(a+"-lazy-image--handled")||(e.classList.add(a+"-lazy-image--handled"),e.onerror=()=>{e.classList.remove(a+"-lazy-image--handled")},e.src=t)},Instafeed.prototype._observeAndPlayVideos=function(){const e=parseInt(this.options.autoplay),t=e=>e?.play(),s=e=>document.getElementById(`inline-video-${e}-${this.options.target}`),i={threshold:.01};if(1===e&&this._validateCharge(this.options.charge)){const e=document.querySelectorAll('.auto-loop-videos[data-feed-id="'+this.options.feedId+'"]'),s=new IntersectionObserver(((e,s)=>{e.forEach((e=>{e.isIntersecting&&(t(e.target),s.unobserve(e.target))}))}),i);e.forEach((e=>s.observe(e)))}if(2===e&&this._validateCharge(this.options.charge)){const e=document.querySelectorAll("video[data-poster]");let o=new IntersectionObserver((e=>{e.forEach((e=>{if(e.isIntersecting){let t=e.target,s=t.getAttribute("data-poster");t.setAttribute("poster",s),o.unobserve(t)}}))}),i);e.forEach((e=>{o.observe(e)}));const n=document.querySelectorAll(`.${a}-hover-layer[data-feed-id='${this.options.feedId}-video'], .${a}-overlay[data-feed-id='${this.options.feedId}-video']`);n.forEach((e=>{e.style.opacity="1",e.style.background="transparent"})),n.forEach((e=>{const i=i=>{const o=e.getAttribute(`data-${a}-open-id`).split("-")[0],n=s(o);var r;i?(t(n),e.style.opacity=0):(r=n,r?.pause(),e.style.opacity=1)};l.addListener(e,"mouseover",(()=>i(!0))),l.addListener(e,"mouseout",(()=>i(!1))),l.addListener(e,"touchstart",(()=>i(!0))),l.addListener(e,"touchend",(()=>i(!1)))}))}},Instafeed}();!function(){var e,t;function s(t,s=!1){const i=document.getElementById(t);i&&(i.style.setProperty("display","none","important"),i.style.opacity=0,s||(document.body.classList.remove("instafeed-body-no-scroll"),l.removeListener(document.body,"touchmove",instafeedTouchScrollListener,{passive:!1})),instafeedSettings.modalOpen=null,l.removeListener(window,"keydown",e,!1))}l.addListener(document,"click",(function(i){if(!i.target||!i.target.hasAttribute(`data-${a}-open-id`)&&!i.target.hasAttribute(`data-${a}-close-id`))return!1;var o=i.target.hasAttribute(`data-${a}-open-id`)?i.target.getAttribute(`data-${a}-open-id`):i.target.getAttribute(`data-${a}-close-id`),n=document.getElementById("video-"+t),d=document.getElementById("video-"+o);if(d&&(instafeedSettings.sound?d.muted=!1:d.muted=!0,d.onplay=()=>{null===instafeedSettings.modalOpen&&d.pause()}),n&&n.pause(),i.target.hasAttribute(`data-${a}-open-id`)){const t=document.getElementById(o);if(instafeedSettings.previouslyFocusedElement=document.activeElement,t){let i=!1;instafeedSettings.modalOpen&&(i=!0,s(instafeedSettings.modalOpen,i)),instafeedSettings.modalOpen=o,t.style.setProperty("display","flex","important"),i?t.style.opacity=1:requestAnimationFrame((()=>{t.style.opacity=1}));const n=t.querySelector(".simple-popup");document.body.classList.add("instafeed-body-no-scroll"),n&&!i&&l.addListener(document.body,"touchmove",instafeedTouchScrollListener,{passive:!1}),d&&d.play();const p=`.${a}-new-arrow`,{firstFocusableElement:c,lastFocusableElement:u}=function(e,t){const s=e.querySelectorAll(t),i=s[0],o=s[s.length-1];return{firstFocusableElement:i,lastFocusableElement:o}}(t,p);e=e=>{!function(e,t,s){r;let i="Tab"===e.key||9===e.keyCode;if(!i)return;e.shiftKey?e.target===t&&(s.focus(),e.preventDefault()):e.target===s&&(t.focus(),e.preventDefault())}(e,c,u)},l.addListener(window,"keydown",e,!1),t.focus()}}i.target.hasAttribute(`data-${a}-close-id`)&&(instafeedSettings.previouslyFocusedElement&&instafeedSettings.previouslyFocusedElement.focus(),s(o)),t=o})),l.addListener(window,"keydown",(e=>{const{key:t}=e;if("Escape"===t)instafeedSettings.modalOpen&&s(instafeedSettings.modalOpen);else if("Enter"===e.key){const e=document.activeElement;("true"===e.getAttribute("aria-haspopup")||e.classList.contains(`${a}-close-button`)||e.classList.contains(`${a}-carousel-arrow`)||e.classList.contains(`${a}-new-arrow`))&&e.click()}var i=document.getElementById(instafeedSettings.modalOpen);if(i){var o="";if("ArrowLeft"===t?o=`.${a}-new-arrow.prev`:"ArrowRight"===t&&(o=`.${a}-new-arrow.next`),o){var n=i.querySelector(o);n&&n.click()}}}))}(),window.instafeedToggleSound=e=>{var t=e.getAttribute("data-video-id"),s=document.getElementById(t);s.muted=!s.muted,instafeedSettings.sound=!s.muted,document.querySelectorAll(".instafeed-sound-button").forEach((function(e){e.classList.toggle("sound-on")}))},window.instafeedCarouselArrow=function(e,t,s,i){const o=instafeedSettings.carousels[t][s],n=o.length,a=e.closest("div.instafeed-post-image");if(a){const e=a.querySelector("img");if(e&&n>0){const a=e.src;let r=o.indexOf(a);-1===r&&(r=0),r="left"===i?0===r?n-1:r-1:r===n-1?0:r+1,document.getElementById(`instafeed-carousel-dots-${t}-${s}`)?.querySelector(".instafeed-carousel-dot.active")?.classList.remove("active"),document.getElementById(`instafeed-carousel-dot-${t}-${s}-${r}`)?.classList.add("active"),e.src=o[r]}}},window.instafeedSliderMove=(e,t=0)=>{instafeedSettings.sliderState[t]||(instafeedSettings.sliderState[t]={currentTransform:0,minTransform:0});const s=instafeedSettings.sliderState[t],i=Math.ceil(instafeedSettings.totalImages[t]/instafeedSettings.sliderNumVisibleImages[t])-1,o=parseFloat(instafeedSettings.sliderRowSize[t]*i).toFixed(2);s.currentTransform+=e*-instafeedSettings.sliderStepSize[t],s.currentTransform=parseFloat(s.currentTransform.toFixed(2)),s.currentTransform<-o&&(s.currentTransform=s.minTransform),s.currentTransform>s.minTransform&&(s.currentTransform=-o);const n=document.querySelector(`.${a}-new-layout-wrapper[data-feed-id="${t}"]`);n&&(n.style.transform=`translateX(${s.currentTransform}px)`)},window.instafeedSettings={},instafeedSettings.version=s,instafeedSettings.sound=!1,instafeedSettings.modalOpen=null,instafeedSettings.previouslyFocusedElement=null,instafeedSettings.carousels={},instafeedSettings.sliderRowSize={},instafeedSettings.sliderStepSize={},instafeedSettings.sliderNumVisibleImages={},instafeedSettings.sliderState={},instafeedSettings.totalImages={},window.instafeedFeedsLoaded=window.instafeedFeedsLoaded||[],window.instafeedScrollIntervals=window.instafeedScrollIntervals||{},window.instafeedSlideSpeed=window.instafeedSlideSpeed||6e3,window.instafeedPopupsPreloaded=window.instafeedPopupsPreloaded||!1,window.instafeedTouchScrollListener=window.instafeedTouchScrollListener||function(e){e.preventDefault()},function(e,t){"use strict";"function"!=typeof e.CustomEvent&&(e.CustomEvent=function(e,s){s=s||{bubbles:!1,cancelable:!1,detail:void 0};var i=t.createEvent("CustomEvent");return i.initCustomEvent(e,s.bubbles,s.cancelable,s.detail),i},e.CustomEvent.prototype=e.Event.prototype),t.addEventListener("touchstart",(function(e){"true"!==e.target.getAttribute("data-swipe-ignore")&&(r=e.target,a=Date.now(),s=e.touches[0].clientX,i=e.touches[0].clientY,o=0,n=0,d=e.touches.length)}),!1),t.addEventListener("touchmove",(function(e){if(s&&i){var t=e.touches[0].clientX,a=e.touches[0].clientY;o=s-t,n=i-a}}),!1),t.addEventListener("touchend",(function(e){if(r===e.target){var p=parseInt(l(r,"data-swipe-threshold","20"),10),c=l(r,"data-swipe-unit","px"),u=parseInt(l(r,"data-swipe-timeout","500"),10),h=Date.now()-a,g="",m=e.changedTouches||e.touches||[];if("vh"===c&&(p=Math.round(p/100*t.documentElement.clientHeight)),"vw"===c&&(p=Math.round(p/100*t.documentElement.clientWidth)),Math.abs(o)>Math.abs(n)?Math.abs(o)>p&&h0?"swiped-left":"swiped-right"):Math.abs(n)>p&&h0?"swiped-up":"swiped-down"),""!==g){var f={dir:g.replace(/swiped-/,""),touchType:(m[0]||{}).touchType||"direct",fingers:d,xStart:parseInt(s,10),xEnd:parseInt((m[0]||{}).clientX||-1,10),yStart:parseInt(i,10),yEnd:parseInt((m[0]||{}).clientY||-1,10)};r.dispatchEvent(new CustomEvent("swiped",{bubbles:!0,cancelable:!0,detail:f})),r.dispatchEvent(new CustomEvent(g,{bubbles:!0,cancelable:!0,detail:f}))}s=null,i=null,a=null}}),!1);var s=null,i=null,o=null,n=null,a=null,r=null,d=0;function l(e,s,i){for(;e&&e!==t.documentElement;){var o=e.getAttribute(s);if(o)return o;e=e.parentNode}return i}}(window,document);if(document.getElementById('insta-feed')!==null){var feed=new Instafeed({account:'',hash:'52b03db255b509879c403f3a0361374e',key:'instafeed-c0cc3aac227b0a5c56a3f43ecc61d102',apiVersion:4,shopOrigin:'perfumes-real-col.myshopify.com',title:'',openIg:1,space:0,corners:0,likes:1,showFollowers:0,showProducts:0,layout:6,format:0,sliderBehavior:0,instagramLinks:0,loadingAnimation:0,filter:'',taggedPosts:0,columns:4,columnsMobile:4,rows:1,rowsMobile:1,autoplay:0,autoLayout:1,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()});