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.6.0",o="feed",n="insta-feed",a=".instafeed-lightbox",r="instafeed",d=!1;window.instafeedEvents=window.instafeedEvents||[];class l{constructor(){this.listeners=window.instafeedEvents=window.instafeedEvents||[],this.debugMode=!1}addListener(e,t,i,s={}){e.addEventListener(t,i,s),this.listeners.push({element:e,event:t,handler:i}),this.debugMode&&(console.log(`Added listener for ${t}`),console.log("Listeners",this.listeners))}removeListener(e,t,i){e.removeEventListener(t,i),this.listeners=this.listeners.filter((s=>!(s.element===e&&s.event===t&&s.handler===i))),this.debugMode&&(console.log(`Removed listener for ${t}`),console.log("Listeners",this.listeners))}clearAllListeners(){this.listeners.forEach((({element:e,event:t,handler:i})=>{e.removeEventListener(t,i)})),this.listeners=[],this.debugMode&&console.log("All listeners have been removed")}}const p=new l;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:n,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(a).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")+"");const i=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{i.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:o,error_message:n}}=t,a=parseInt(o,10);if(s.innerHTML="",200!==a)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 d=t.data,l=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(i=0,len=d.length;i1){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 i="";parseInt(t.variant)>0&&(i="?variant="+parseInt(t.variant));let s="undefined"!=typeof Shopify&&Shopify.locale?Shopify.locale:this.options.locale;var o,n;t.translations&&s in t.translations&&"title"in t.translations[s]&&""!==t.translations[s].title.trim()&&(t.title=t.translations[s].title),this.options.admin?(o="
"+t.title+"
",n="
"+t.title+"
"):(o="
"+t.title+"
",n="
"+t.title+"
"),y+="
"+n+"
"+o+"
"}));var b="",w="";if("video"===g.type&&g.hasOwnProperty("videos")){b=r+"-video",w="
",imageFullHtml="'}else imageFullHtml="Instagram post with the caption: "+this._escapeHtml(this._getObjectProperty(g,"caption.text").substring(0,64))+"...";var I=1===this.options.picturesLoaded?Math.min(this.options.picturesNeeded,d.length):this.options.picturesLoaded-1,_=this.options.picturesLoaded===this.options.picturesNeeded||this.options.picturesLoaded===d.length?1:this.options.picturesLoaded+1;c+=this._makeTemplate(l,{model:g,id:this.options.picturesLoaded,fullId:g.id,minusId:I,plusId:_,link:g.link,image:v.url,video:b,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:w,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 S=0;if(S=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/S)),instafeedSettings.totalImages[this.options.feedId]=this.options.picturesLoaded,s.innerHTML+=this._generateLayoutHTML(d,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()&&(p.addListener(s,"swiped-left",(e=>{instafeedSliderMove(1,this.options.feedId)})),p.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 E=new CustomEvent("instafeedAppLoaded");return document.dispatchEvent(E),instafeedFeedsLoaded.push(this.options.feedId),!0},Instafeed.prototype._geModalTemplate=function(){let t="",i=2===parseInt(this.options.openIg)?"simple-popup":"";var s=this._validateCharge(this.options.charge)&&parseInt(this.options.likes)>0&&4!==parseInt(this.options.apiVersion)?s="{{likes}}":"",o=1===parseInt(this.options.taggedPosts)||4===parseInt(this.options.taggedPosts)?"{{tagged_username}}":"",n=this.options.admin?"
":"";t="
";var a="";return 2===parseInt(this.options.openIg,10)&&(a=n+"
{{taggedProduct}}
"),t+="
",t},Instafeed.prototype._changeMobileDOM=function(){if(this._isMobileDevice(!0)){document.querySelectorAll("."+r+"-post-image").forEach((e=>{const t=e.nextElementSibling,i=t?t.querySelector("."+r+"-header"):null;i&&e.parentNode.insertBefore(i,e)}))}},Instafeed.prototype._setFeedHeader=function(e,t){const i=document.getElementById(this.options.target),s=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=s?`

${this._shortenLargeNumber(e)} followers

`:"",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"],l=this.options.title.length>0||a;let p="";if(o&&(p+=``),l){p+=`

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

`}s&&(p+=n),(l||s)&&this._appendHtmlToParent(p,i,i.firstChild)},Instafeed.prototype._setNumVisibleImages=function(){const e=document.getElementById(this.options.target),t=parseFloat(e.offsetWidth.toFixed(2)),i=parseFloat((t/instafeedSettings.sliderNumVisibleImages[this.options.feedId]*(parseInt(this.options.space)/100)).toFixed(2)),s=parseInt(instafeedSettings.sliderNumVisibleImages[this.options.feedId]-1),o=parseFloat((s*i).toFixed(2)),n=parseFloat((t-o).toFixed(2)),a=parseFloat((n/instafeedSettings.sliderNumVisibleImages[this.options.feedId]).toFixed(2)),d=1===parseInt(this.options.format)?parseFloat((a*(16/9)).toFixed(2)):2===parseInt(this.options.format)?parseFloat((a*(5/4)).toFixed(2)):3===parseInt(this.options.format)?parseFloat((a*(3/4)).toFixed(2)):parseFloat(a.toFixed(2));if(document.querySelectorAll(`.${r}-new-layout-item[data-feed-id="${this.options.feedId}"]`).forEach((e=>{e.style.width=`${a}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(`.${r}-new-layout-container[data-feed-id="${this.options.feedId}"]`);l.style.width=`${t}px`,l.style.height=`${d}px`,document.querySelector(`.${r}-new-layout-wrapper[data-feed-id="${this.options.feedId}"]`).style.gap=`${i}px`,instafeedSettings.sliderStepSize[this.options.feedId]=0===this.options.sliderBehavior||2===this.options.sliderBehavior?t+i:a+i,instafeedSettings.sliderRowSize[this.options.feedId]=t+i},Instafeed.prototype._generateLayoutHTML=function(e){let t="",i=0;for(let s of e)if(i++,t+=this._imageTemplate(s,i),i>=this.options.picturesNeeded||e.length===i)break;let s="";return i>instafeedSettings.sliderNumVisibleImages[this.options.feedId]&&this.options.sliderBehavior<=1&&7===parseInt(this.options.layout)&&(s=`\n \n \n `),`\n
\n
\n ${t}\n
\n ${s}\n
`},Instafeed.prototype._imageTemplate=function(t,i){const s=parseInt(this.options.openIg,10),o=parseInt(this.options.showProducts,10);let n=t.images.standard_resolution,a=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: '${a}...'`,c="inline-product"===l?`
${d}
`:`
${this._generateIcon(t)}
`,u=s>1?"tabindex='0' aria-haspopup='true' aria-label='open post'":"",h=0!==s?`
${c}
`:"";p+=`\n
\n ${h}\n
`;const g=this._generatePostUrl(p,t,i);return`
${g}
`},Instafeed.prototype._generatePostUrl=function(e,t,i){return 1===parseInt(this.options.openIg,10)?`${e}`:e},Instafeed.prototype._generateProductBox=function(e){let t=this.translate("SHOP_NOW"),i=this.options.admin?this.options.shopOrigin:window.location.hostname,s=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 i="video"===t.type?"video-icon-v3.png":"instagram-icon-v2.svg";return``}},Instafeed.prototype._appendHtmlToParent=function(e,t=document.body,i=null){const s=document.createElement("template");for(s.innerHTML=e;s.content.firstChild;)t.insertBefore(s.content.firstChild,i)},Instafeed.prototype._addSwipePopupEvents=function(){p.addListener(document,"swiped",(function(e){var t=document.getElementById(instafeedSettings.modalOpen);if(t&&e.target.className.includes("simple-popup")){var i="";if("up"===e.detail.dir?i=`.${r}-new-arrow.prev`:"down"===e.detail.dir&&(i=`.${r}-new-arrow.next`),i){var s=t.querySelector(i);s&&s.click()}}}))},Instafeed.prototype._buildUrl=function(){const t=window.location.pathname.includes("/products/")?window.location.pathname.split("/products/")[1]:"",i=t&&t.length>0?`&handle=${t}`:"",s=this.options.overrides.length>0?`&overrides=${this.options.overrides}`:"",n=this.options.forceUpdate?1:0;return`https://${e}/${o}/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}${i}${s}`},Instafeed.prototype._makeTemplate=function(e,t){return e.replace(/{{([\w[\].]+)}}/g,((e,i)=>{const s=this._getObjectProperty(t,i);return null!==s?s:""}))},Instafeed.prototype._getObjectProperty=function(e,t){const i=(t=t.replace(/\[(\w+)\]/g,".$1")).split(".");for(const t of i){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 i=["k","M","G","T","P","E","Z","Y"];for(let s=i.length-1;s>=0;s--){const o=Math.pow(1e3,s+1);if(e<=-o||e>=o)return+(e/o).toFixed(t)+i[s]}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/${r}-${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 i=0;e.querySelectorAll("video, img").forEach(((e,s)=>{setTimeout((()=>{if("VIDEO"===e.tagName)e.setAttribute("preload","auto"),e.load();else{const t=e.getAttribute("data-src");t&&(e.setAttribute("src",t),e.classList.add(r+"-lazy-image--handled"))}}),t),t+=200+i,i+=50}))}))},Instafeed.prototype._enableLazyLoading=function(){const e=document.querySelectorAll("."+r+"-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(r+"-lazy-image--handled")||t.observe(e)}))},Instafeed.prototype.preloadImage=function(e){const t=e.dataset.src;e.classList.contains(r+"-lazy-image--handled")||(e.classList.add(r+"-lazy-image--handled"),e.onerror=()=>{e.classList.remove(r+"-lazy-image--handled")},e.src=t)},Instafeed.prototype._observeAndPlayVideos=function(){const e=parseInt(this.options.autoplay),t=e=>e?.play(),i=e=>document.getElementById(`inline-video-${e}-${this.options.target}`),s={threshold:.01};if(1===e&&this._validateCharge(this.options.charge)){const e=document.querySelectorAll('.auto-loop-videos[data-feed-id="'+this.options.feedId+'"]'),i=new IntersectionObserver(((e,i)=>{e.forEach((e=>{e.isIntersecting&&(t(e.target),i.unobserve(e.target))}))}),s);e.forEach((e=>i.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,i=t.getAttribute("data-poster");t.setAttribute("poster",i),o.unobserve(t)}}))}),s);e.forEach((e=>{o.observe(e)}));const n=document.querySelectorAll(`.${r}-hover-layer[data-feed-id='${this.options.feedId}-video'], .${r}-overlay[data-feed-id='${this.options.feedId}-video']`);n.forEach((e=>{e.style.opacity="1",e.style.background="transparent"})),n.forEach((e=>{const s=s=>{const o=e.getAttribute(`data-${r}-open-id`).split("-")[0],n=i(o);var a;s?(t(n),e.style.opacity=0):(a=n,a?.pause(),e.style.opacity=1)};p.addListener(e,"mouseover",(()=>s(!0))),p.addListener(e,"mouseout",(()=>s(!1))),p.addListener(e,"touchstart",(()=>s(!0))),p.addListener(e,"touchend",(()=>s(!1)))}))}},Instafeed}();!function(){var e,t;function i(t,i=!1){const s=document.getElementById(t);s&&(s.style.setProperty("display","none","important"),s.style.opacity=0,i||(document.body.classList.remove("instafeed-body-no-scroll"),p.removeListener(document.body,"touchmove",instafeedTouchScrollListener,{passive:!1})),instafeedSettings.modalOpen=null,p.removeListener(window,"keydown",e,!1))}p.addListener(document,"click",(function(s){if(!s.target||!s.target.hasAttribute(`data-${r}-open-id`)&&!s.target.hasAttribute(`data-${r}-close-id`))return!1;var o=s.target.hasAttribute(`data-${r}-open-id`)?s.target.getAttribute(`data-${r}-open-id`):s.target.getAttribute(`data-${r}-close-id`),n=document.getElementById("video-"+t),a=document.getElementById("video-"+o);if(a&&(instafeedSettings.sound?a.muted=!1:a.muted=!0,a.onplay=()=>{null===instafeedSettings.modalOpen&&a.pause()},p.addListener(a,"volumechange",(function(){instafeedSettings.sound=!a.muted}))),n&&n.pause(),s.target.hasAttribute(`data-${r}-open-id`)){const t=document.getElementById(o);if(instafeedSettings.previouslyFocusedElement=document.activeElement,t){let s=!1;instafeedSettings.modalOpen&&(s=!0,i(instafeedSettings.modalOpen,s)),instafeedSettings.modalOpen=o,t.style.setProperty("display","flex","important"),s?t.style.opacity=1:requestAnimationFrame((()=>{t.style.opacity=1}));const n=t.querySelector(".simple-popup");document.body.classList.add("instafeed-body-no-scroll"),n&&!s&&p.addListener(document.body,"touchmove",instafeedTouchScrollListener,{passive:!1}),a&&a.play();const l=`.${r}-new-arrow`,{firstFocusableElement:c,lastFocusableElement:u}=function(e,t){const i=e.querySelectorAll(t),s=i[0],o=i[i.length-1];return{firstFocusableElement:s,lastFocusableElement:o}}(t,l);e=e=>{!function(e,t,i){d;let s="Tab"===e.key||9===e.keyCode;if(!s)return;e.shiftKey?e.target===t&&(i.focus(),e.preventDefault()):e.target===i&&(t.focus(),e.preventDefault())}(e,c,u)},p.addListener(window,"keydown",e,!1),t.focus()}}s.target.hasAttribute(`data-${r}-close-id`)&&(instafeedSettings.previouslyFocusedElement&&instafeedSettings.previouslyFocusedElement.focus(),i(o)),t=o})),p.addListener(window,"keydown",(e=>{const{key:t}=e;if("Escape"===t)instafeedSettings.modalOpen&&i(instafeedSettings.modalOpen);else if("Enter"===e.key){const e=document.activeElement;("true"===e.getAttribute("aria-haspopup")||e.classList.contains(`${r}-close-button`)||e.classList.contains(`${r}-new-arrow`))&&e.click()}var s=document.getElementById(instafeedSettings.modalOpen);if(s){var o="";if("ArrowLeft"===t?o=`.${r}-new-arrow.prev`:"ArrowRight"===t&&(o=`.${r}-new-arrow.next`),o){var n=s.querySelector(o);n&&n.click()}}}))}(),window.instafeedToggleSound=e=>{var t=e.getAttribute("data-video-id"),i=document.getElementById(t);i.muted=!i.muted,e.classList.toggle("sound-on")},window.instafeedSliderMove=(e,t=0)=>{instafeedSettings.sliderState[t]||(instafeedSettings.sliderState[t]={currentTransform:0,minTransform:0});const i=instafeedSettings.sliderState[t],s=Math.ceil(instafeedSettings.totalImages[t]/instafeedSettings.sliderNumVisibleImages[t])-1,o=parseFloat(instafeedSettings.sliderRowSize[t]*s).toFixed(2);i.currentTransform+=e*-instafeedSettings.sliderStepSize[t],i.currentTransform=parseFloat(i.currentTransform.toFixed(2)),i.currentTransform<-o&&(i.currentTransform=i.minTransform),i.currentTransform>i.minTransform&&(i.currentTransform=-o);const n=document.querySelector(`.${r}-new-layout-wrapper[data-feed-id="${t}"]`);n&&(n.style.transform=`translateX(${i.currentTransform}px)`)},window.instafeedSettings={},instafeedSettings.version=s,instafeedSettings.sound=!1,instafeedSettings.modalOpen=null,instafeedSettings.previouslyFocusedElement=null,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,i){i=i||{bubbles:!1,cancelable:!1,detail:void 0};var s=t.createEvent("CustomEvent");return s.initCustomEvent(e,i.bubbles,i.cancelable,i.detail),s},e.CustomEvent.prototype=e.Event.prototype),t.addEventListener("touchstart",(function(e){"true"!==e.target.getAttribute("data-swipe-ignore")&&(r=e.target,a=Date.now(),i=e.touches[0].clientX,s=e.touches[0].clientY,o=0,n=0,d=e.touches.length)}),!1),t.addEventListener("touchmove",(function(e){if(i&&s){var t=e.touches[0].clientX,a=e.touches[0].clientY;o=i-t,n=s-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(i,10),xEnd:parseInt((m[0]||{}).clientX||-1,10),yStart:parseInt(s,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}))}i=null,s=null,a=null}}),!1);var i=null,s=null,o=null,n=null,a=null,r=null,d=0;function l(e,i,s){for(;e&&e!==t.documentElement;){var o=e.getAttribute(i);if(o)return o;e=e.parentNode}return s}}(window,document);if(document.getElementById('insta-feed')!==null){var feed=new Instafeed({account:'',hash:'0280ba3cfba841d8a836fed8ca5f9901',key:'instafeed-ffea182f09f299edd595afdc5e376550',apiVersion:5,shopOrigin:'perfumes-bogotaa.myshopify.com',title:'Síguenos en nuestra cuenta de Instagram',openIg:3,space:1,corners:6,likes:1,showFollowers:3,showProducts:0,layout:6,format:0,sliderBehavior:0,filter:'',taggedPosts:0,columns:3,columnsMobile:3,rows:3,rowsMobile:3,autoplay:2,autoLayout:1,abtest:0,feedId:0,charge:'28345172209'});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()});