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="nfcube.com",t="instafeed.nfcube.com",i="cdn.nfcube.com",n="14.1.1",s="feed",a="insta-feed",o=".instafeed-lightbox",d="instafeed",r=!1,l=3,c=1024;window.instafeedEvents=window.instafeedEvents||[];class u{constructor(){this.listeners=window.instafeedEvents=window.instafeedEvents||[],this.debugMode=!1}addListener(e,t,i,n={}){this.listeners.some((i=>i.element===e&&i.event===t&&"swiped"===t))?this.debugMode&&console.log(`Listener for ${t} on the specified element already exists.`):(e.addEventListener(t,i,n),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((n=>!(n.element===e&&n.event===t&&n.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 u;var Instafeed=function(){function Instafeed(e){this.translations={en:{SHOP_NOW:"Shop now",ADD_TO_CART:"Add to cart",TAG_PRODUCTS:"Tag products",TAGGED_BY:"Tagged by {username}",VIEW_ON_INSTAGRAM:"View on Instagram",REVIEWS:"{number} reviews",HANG_ON:"Please hang on while we process your feed. This may take a while.",DELETE:"Delete"},"pt-PT":{SHOP_NOW:"Comprar agora",ADD_TO_CART:"Adicionar ao carrinho",TAG_PRODUCTS:"Identificar produtos",TAGGED_BY:"Marcado por {username}",VIEW_ON_INSTAGRAM:"Ver no Instagram",REVIEWS:"{number} avaliações",HANG_ON:"Aguarde um momento, estamos a processar o seu feed. Isto pode demorar um pouco.",DELETE:"Apagar"},"pt-BR":{SHOP_NOW:"Comprar agora",ADD_TO_CART:"Adicionar ao carrinho",TAG_PRODUCTS:"Marcar produtos",TAGGED_BY:"Marcado por {username}",VIEW_ON_INSTAGRAM:"Ver no Instagram",REVIEWS:"{number} avaliações",HANG_ON:"Aguarde um momento, estamos processando seu feed. Isso pode demorar um pouco.",DELETE:"Delete"},es:{SHOP_NOW:"Comprar ahora",ADD_TO_CART:"Añadir al carrito",TAG_PRODUCTS:"Etiquetar productos",TAGGED_BY:"Etiquetado por {username}",VIEW_ON_INSTAGRAM:"Ver en Instagram",REVIEWS:"{number} reseñas",HANG_ON:"Espera un momento, estamos procesando tu feed. Esto puede llevar unos instantes.",DELETE:"Eliminar"},"ja-JP":{SHOP_NOW:"今すぐ購入",ADD_TO_CART:"カートに入れる",TAG_PRODUCTS:"商品にタグを付ける",TAGGED_BY:"{username}によってタグ付けされました",VIEW_ON_INSTAGRAM:"Instagramで見る",REVIEWS:"{number} レビュー",HANG_ON:"少々お待ちください、フィードを処理中です。これには時間がかかる場合があります。",DELETE:"削除"},fr:{SHOP_NOW:"Acheter",ADD_TO_CART:"Ajouter au panier",TAG_PRODUCTS:"Étiqueter les produits",TAGGED_BY:"Tagué par {username}",VIEW_ON_INSTAGRAM:"Afficher sur Instagram",REVIEWS:"{number} avis",HANG_ON:"Patientez, nous traitons votre flux. Cela pourrait prendre un certain temps.",DELETE:"Supprimer"},de:{SHOP_NOW:"Jetzt shoppen",ADD_TO_CART:"Zum Warenkorb hinzufügen",TAG_PRODUCTS:"Produkte taggen",TAGGED_BY:"Getaggt von {username}",VIEW_ON_INSTAGRAM:"Auf Instagram ansehen",REVIEWS:"{number} Bewertungen",HANG_ON:"Einen Moment bitte, wir verarbeiten deinen Feed. Das könnte eine Weile dauern.",DELETE:"Löschen"},sv:{SHOP_NOW:"Handla nu",ADD_TO_CART:"Lägg i kundvagn",TAG_PRODUCTS:"Tagga produkter",TAGGED_BY:"Taggad av {username}",VIEW_ON_INSTAGRAM:"Visa på Instagram",REVIEWS:"{number} recensioner",HANG_ON:"Vänta, vi behandlar ditt flöde. Detta kan ta en stund.",DELETE:"Radera"},it:{SHOP_NOW:"Acquista ora",ADD_TO_CART:"Aggiungi al carrello",TAG_PRODUCTS:"Tagga prodotti",TAGGED_BY:"Taggato da {username}",VIEW_ON_INSTAGRAM:"Visualizza su Instagram",REVIEWS:"{number} recensioni",HANG_ON:"Aspetta, stiamo elaborando il tuo feed. Potrebbe richiedere un po' di tempo.",DELETE:"Elimina"},da:{SHOP_NOW:"Shop nu",ADD_TO_CART:"Tilføj til kurv",TAG_PRODUCTS:"Tag produkter",TAGGED_BY:"Tagget af {username}",VIEW_ON_INSTAGRAM:"Se på Instagram",REVIEWS:"{number} anmeldelser",HANG_ON:"Vent venligst, vi behandler dit feed. Det kan tage lidt tid.",DELETE:"Slet"},nb:{SHOP_NOW:"Handle nå",ADD_TO_CART:"Legg i handlekurv",TAG_PRODUCTS:"Tagge produkter",TAGGED_BY:"Taggede av {username}",VIEW_ON_INSTAGRAM:"Vis på Instagram",REVIEWS:"{number} anmeldelser",HANG_ON:"Vent litt, vi behandler din feed. Dette kan ta en stund.",DELETE:"Slett"},nl:{SHOP_NOW:"Nu winkelen",ADD_TO_CART:"Toevoegen aan winkelwagen",TAG_PRODUCTS:"Producten taggen",TAGGED_BY:"Getagd door {username}",VIEW_ON_INSTAGRAM:"Bekijk op Instagram",REVIEWS:"{number} beoordelingen",HANG_ON:"Even geduld alstublieft, we verwerken je feed. Dit kan even duren.",DELETE:"Verwijderen"}},this.availableLanguages=["en","es","de","fr","sv","da","it","nl","nb","ja-JP","pt-PT","pt-BR"],this.accountUsername="",this.options={target:a,language:"en",locale:"en-US",showLoading:!0,forceUpdate:!1,viewsAndClicks:!1,key:"",overrides:"",picturesLoaded:0,picturesNeeded:0,admin:window.location.hostname===t},"undefined"!=typeof Shopify&&Shopify.locale&&(this.options.locale=Shopify.locale,this.availableLanguages.includes(Shopify.locale)&&(this.options.language=Shopify.locale)),Object.assign(this.options,e),this.options.admin||this.t(),document.querySelectorAll(o).forEach((e=>{e.parentNode.removeChild(e)}))}return Instafeed.prototype.translate=function(e){return this.translations[this.options.language]&&this.translations[this.options.language][e]?this.translations[this.options.language][e]:e},Instafeed.prototype.run=function(){var e=document.getElementById(this.options.target);if(0===e.clientWidth&&parseInt(this.options.autoLayout)>0)return this.i(this,e),!1;this.options.corners=4===parseInt(this.options.format)?"50%":this.options.corners+"px",instafeedSettings.analyticsViewsClicks=Boolean(this.options.viewsAndClicks),!this.o(this.options.charge)&&parseInt(this.options.rows)>parseInt(this.options.rowsLimit)&&(this.options.rows=this.options.rowsLimit),parseInt(this.options.autoLayout)>0?(this.options.picturesNeeded=this.options.rows*this.l(e.clientWidth,this.options.admin),this.u()&&this.o(this.options.charge)&&(this.options.picturesNeeded=this.options.rowsMobile*this.l(e.clientWidth,this.options.admin))):this.u()&&this.o(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&&(e.innerHTML='
'+this.translate("HANG_ON")+"
"),!this.options.admin&&parseInt(this.options.loadingAnimation)>0&&(e.innerHTML='
');const t=this;return Date.now(),fetch(this.p()).then((e=>{if(!e.ok)throw new Error(`${e.status} ${e.statusText}`);return e.json()})).then((e=>{try{t.parse(e)}catch(e){console.error("Parse function error:",e.message)}})).catch((e=>{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(e){var i,n,s,a,o,r,l,c,u,p,h,f,g,m,v,w,$,b;const S=document.getElementById(this.options.target);if(!S)return!1;if("object"!=typeof e)throw new Error("Invalid JSON response");const{meta:{code:y,error_message:I}}=e,T=parseInt(y,10);if(S.innerHTML="",200!==T)return this.options.admin&&"function"==typeof this.options.error&&this.options.error.call(this,e),!1;for("function"==typeof this.options.success&&this.options.success.call(this,e),i=e.data,n=0,s="",this.accountUsername=e.meta.username,n=0,len=i.length;n1?"display:none;":"";if(p="instafeed-simple-popup"===b?"instafeed-tagged-buy-button-simple-popup":"tagged-buy-button",h=this.h(b,S),this.options.picturesLoaded++,parseInt(this.options.openIg)>1){if(parseInt(this.options.showProducts)<2&&a.hasOwnProperty("tagged_products")&&a.tagged_products.length>0&&this.o(this.options.charge)&&a.tagged_products.forEach((e=>{let i="";parseInt(e.variant)>0&&(i="?variant="+parseInt(e.variant));let n="undefined"!=typeof Shopify&&Shopify.locale?Shopify.locale:this.options.language;var s,o;e.translations&&n in e.translations&&"title"in e.translations[n]&&""!==e.translations[n].title.trim()&&(e.title=e.translations[n].title),this.options.addToCart&&parseInt(e.variant)>0&&!this.options.admin?(c=this.translate("ADD_TO_CART"),productClick=`onclick="event.preventDefault(); instafeedAddToCart(this, ${parseInt(e.variant)}, '${c}', '${b}');"`):(c=this.translate("SHOP_NOW"),this.options.admin||(productClick="href = '//"+window.location.hostname+Shopify.routes.root+e.handle+i+"'"));let r=parseInt(this.options.showPrices)>0?this.m(e.price):"",l=parseInt(this.options.showReviews)>0&&e.rating_count>0?this.v(e.rating,e.rating_count):"";this.options.admin?(s="
"+e.title+"
"+l+r+"
",o=""+e.title+""):(s="
"+e.title+"
"+l+r+"
",o=""+e.title+""),u+="
"+o+"
"+s+"
"})),f="",g="",m="",v="",a.carousel){const e=this.options.feedId;instafeedSettings.carousels[e]||(instafeedSettings.carousels[e]={}),instafeedSettings.carousels[e][n]=a.carousel.map((e=>e.thumbnail_url?e.thumbnail_url:e.media_url));let t="";a.carousel.forEach(((i,s)=>{t+=``})),v=`\n \n \n \n `}"video"===a.type&&a.hasOwnProperty("videos")?(f=d+"-video",g="
",m="
",imageFullHtml=v+'
'):imageFullHtml=v+"Instagram post with the caption: "+this.$(this.S(a,"caption.text").substring(0,64))+"...",w=1===this.options.picturesLoaded?Math.min(this.options.picturesNeeded,i.length):this.options.picturesLoaded-1,$=this.options.picturesLoaded===this.options.picturesNeeded||this.options.picturesLoaded===i.length?1:this.options.picturesLoaded+1,imageFullHtml="
"+m+g+imageFullHtml,s+=this.I(h,{model:a,id:this.options.picturesLoaded,fullId:a.id,minusId:w,plusId:$,link:a.link,image:l.url,video:f,tagged_username:a.user.username.length>0&&this.accountUsername!==a.user.username?"
"+this.translate("TAGGED_BY").replace("{username}","@"+a.user.username+"
"):"",username:e.meta.username,fullName:e.meta.full_name,userPicture:this.options.apiVersion>4&&parseInt(this.options.charge)>0&&r.length>0?r:"https://"+t+"/assets/img/logo-instagram-transparent.png",imageFullHtml:imageFullHtml,taggedProduct:u,date:this.T(a.created_time),caption:this.$(this.S(a,"caption.text")),likes:a.likes.count>0?" "+this.A(a.likes.count,1)+" \x3c!--❞ {{comments}}--\x3e":"",comments:this.A(a.comments.count,1),location:this.S(a,"location.name")})}if(this.options.picturesLoaded>=this.options.picturesNeeded||e.data.length===this.options.picturesLoaded)break}clearInterval(instafeedScrollIntervals[this.options.feedId]),this._(s),b=parseInt(this.options.autoLayout)>0?parseFloat(100/this.l(S.clientWidth,this.options.admin)).toFixed(3):this.u()&&this.o(this.options.charge)?parseFloat(100/this.options.columnsMobile).toFixed(3):parseFloat(100/this.options.columns).toFixed(3),instafeedSettings.sliderNumVisibleImages[this.options.feedId]=parseInt(Math.round(100/b)),instafeedSettings.totalImages[this.options.feedId]=this.options.picturesLoaded,S.innerHTML+=this.O(i,this.$),this.D(),this.N(o,r),this.k(),this.G(),this.R(),parseInt(this.options.openIg,10)>1&&this.P(),2===parseInt(this.options.openIg,10)&&this.u()&&this.C();const E=new CustomEvent("instafeedAppLoaded");return document.dispatchEvent(E),instafeedFeedsLoaded.push(this.options.feedId),!0},Instafeed.prototype.h=function(e,i){var n,s,a;let o="";n=this.o(this.options.charge)&&parseInt(this.options.likes)>0&&4!==parseInt(this.options.apiVersion)?n="{{likes}}":"",s=this.options.admin?"
":"";const r=`
`,l=this.u(!0)?"":r,c=this.u(!0)?r:"",u=this.u(!0)?"":"",p=this.u(!0)?"":"";o="
"+l+u,a="","instafeed-simple-popup"===e&&(a=s+"
{{taggedProduct}}
"),o+=""+p+"
",o},Instafeed.prototype.k=function(){this.u(!0)&&document.querySelectorAll("."+d+"-post-image").forEach((e=>{const t=e.nextElementSibling,i=t?t.querySelector("."+d+"-header"):null;i&&e.parentNode.insertBefore(i,e)}))},Instafeed.prototype.N=function(e,t){const i=document.getElementById(this.options.target),n=this.o(this.options.charge)&&parseInt(this.options.apiVersion)>4&&(1===parseInt(this.options.showFollowers)||3===parseInt(this.options.showFollowers)),s=this.o(this.options.charge)&&parseInt(this.options.apiVersion)>4&&parseInt(this.options.showFollowers)>1,a=n?`

${this.A(e)} followers

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

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

`),n&&(c+=a),(l||n)&&this._(c,i,i.firstChild)},Instafeed.prototype.D=function(){const e=document.getElementById(this.options.target),t=document.querySelector(`.${d}-new-layout-container[data-feed-id="${this.options.feedId}"]`),i=document.querySelector(`.${d}-new-layout-wrapper[data-feed-id="${this.options.feedId}"]`),n=parseFloat(e.offsetWidth.toFixed(3)),s=parseFloat((n/instafeedSettings.sliderNumVisibleImages[this.options.feedId]*(parseInt(this.options.space)/100)).toFixed(3)),a=parseInt(instafeedSettings.sliderNumVisibleImages[this.options.feedId]-1),o=parseFloat((a*s).toFixed(3)),r=parseFloat((n-o).toFixed(3)),l=parseFloat((r/instafeedSettings.sliderNumVisibleImages[this.options.feedId]).toFixed(3)),c=1===parseInt(this.options.format)?parseFloat((l*(16/9)).toFixed(3)):2===parseInt(this.options.format)?parseFloat((l*(5/4)).toFixed(3)):3===parseInt(this.options.format)?parseFloat((l*(3/4)).toFixed(3)):parseFloat(l.toFixed(3));document.querySelectorAll(`.${d}-new-layout-item[data-feed-id="${this.options.feedId}"]`).forEach((e=>{e.style.width=`${l}px`,e.style.height=`${c}px`})),1===parseInt(this.options.showProducts,10)&&this.o(this.options.charge)&&c>=300&&(document.querySelectorAll(`.${d}-new-layout-item[data-feed-id="${this.options.feedId}"] .instafeed-product-item img`).forEach((e=>{e.style.display="block",e.style.height=Math.min(parseFloat((.15*c).toFixed(3)),60)+"px",e.style.width=Math.min(parseFloat((.15*c).toFixed(3)),60)+"px"})),document.querySelectorAll(`.${d}-new-layout-item[data-feed-id="${this.options.feedId}"] .instafeed-tagged-buy-button-simple-popup`).forEach((e=>{e.style.display="block"}))),t.style.width=`${n}px`,t.style.height=`${c}px`,i.style.gap=`${s}px`,instafeedSettings.sliderStepSize[this.options.feedId]=0===this.options.sliderBehavior||2===this.options.sliderBehavior?n+s:l+s,instafeedSettings.sliderRowSize[this.options.feedId]=n+s,instafeedSettings.totalImages[this.options.feedId]=instafeedSettings.sliderNumVisibleImages[this.options.feedId]&&(i.style.display="grid",t.style.height="unset",i.style.gridTemplateColumns="repeat("+instafeedSettings.sliderNumVisibleImages[this.options.feedId]+", 1fr)"),7===parseInt(this.options.layout)&&instafeedSettings.totalImages[this.options.feedId]>=instafeedSettings.sliderNumVisibleImages[this.options.feedId]&&(this.u()&&(p.addListener(e,"swiped-left",(e=>{e.detail.touchType&&instafeedSliderMove(1,this.options.feedId)})),p.addListener(e,"swiped-right",(e=>{e.detail.touchType&&instafeedSliderMove(-1,this.options.feedId)}))),instafeedSettings.sliderState={},this.options.sliderBehavior>1&&(instafeedScrollIntervals[this.options.feedId]=setInterval((()=>{instafeedSliderMove(1,this.options.feedId)}),instafeedSlideSpeed)))},Instafeed.prototype.m=function(e){if(this.options.admin&&""!==e)return`
${e}
`;if(!((e=Number(e))>0))return"";let t=e.toFixed(2);if("undefined"!=typeof Shopify){const i=Shopify.currency?.active||"USD";e*=Shopify.currency?.rate||1,t=new Intl.NumberFormat(void 0,{style:"currency",currency:i}).format(e)}return`
${t}
`},Instafeed.prototype.v=function(e,t){let i='
';const n=Math.floor(e),s=e%1!=0;for(let e=0;e<5;e++)i+=e
':e===n&&s?'
':'
';return i+=`
${t>1?" | "+this.translate("REVIEWS").replace("{number}",t):"("+t+")"}`,i},Instafeed.prototype.O=function(e){let t="",i=0;for(let n of e)if(i++,t+=this.M(n,i),i>=this.options.picturesNeeded||e.length===i)break;let n="";return i>instafeedSettings.sliderNumVisibleImages[this.options.feedId]&&this.options.sliderBehavior<=1&&7===parseInt(this.options.layout)&&(n=`\n \n \n `),`\n
\n
\n ${t}\n
\n ${n}\n
`},Instafeed.prototype.M=function(e,i){const n=parseInt(this.options.openIg,10),s=parseInt(this.options.showProducts,10);let a=e.images.standard_resolution,o=this.$(e.caption.text).substring(0,60),r=1===s&&4!==parseInt(this.options.format)&&e.hasOwnProperty("tagged_products")&&e.tagged_products.length>0&&this.o(this.options.charge)?this.W(e.tagged_products):"",l=r.length>0?"inline-product":"",c="video"===e.type&&parseInt(this.options.autoplay,10)>0&&this.o(this.options.charge)?``:`Instagram post with the caption: '${o}...'`,u="inline-product"===l?`
${r}
`:`
${this.V(e)}
`,p=n>0?"role='link' tabindex='0'":"",h=n>1?"aria-haspopup='dialog' aria-label='Instagram post opens in a popup'":"",f=0!==n?`
${u}
`:"";c+=`\n
\n ${f}\n
`;const g=this.H(c,e,i);return`
${g}
`},Instafeed.prototype.H=function(e,t){return 1===parseInt(this.options.openIg,10)?`${e}`:e},Instafeed.prototype.W=function(e){let t=this.translate("SHOP_NOW"),i=this.options.admin?this.options.shopOrigin:window.location.hostname,n=this.options.admin?"/":Shopify.routes.root,s=this.options.admin?"":'style="pointer-events:all;"';return(e=e.slice(0,1)).map((e=>{let a=parseInt(e.variant)>0?"?variant="+parseInt(e.variant):"";return`\n `})).join("")},Instafeed.prototype.V=function(e){if(this.o(this.options.charge)&&parseInt(this.options.likes)>0&&parseInt(this.options.apiVersion)>4)return`\n ${this.A(e.likes.count,1)}`;{const i="video"===e.type?"video-icon-v3.png":"instagram-icon-v2.svg";return``}},Instafeed.prototype._=function(e,t=document.body,i=null){const n=document.createElement("template");for(n.innerHTML=e;n.content.firstChild;)t.insertBefore(n.content.firstChild,i)},Instafeed.prototype.C=function(){p.addListener(document,"swiped",(function(e){var t,i,n;(window.lastSwipeEventInstafeed||{}).target!==e.target&&(t=document.getElementById(instafeedSettings.modalOpen))&&e.target.className.includes("instafeed-simple-popup")&&(i="","up"===e.detail.dir?i=`.${d}-new-arrow.next`:"down"===e.detail.dir&&(i=`.${d}-new-arrow.prev`),i&&(n=t.querySelector(i))&&n.click(),window.lastSwipeEventInstafeed=e)}))},Instafeed.prototype.p=function(){const e=window.location.pathname.includes("/products/")?window.location.pathname.split("/products/")[1]:"",i=e&&e.length>0?`&handle=${e}`:"",n=this.options.overrides.length>0?`&overrides=${this.options.overrides}`:"",a=this.options.forceUpdate?1:0;return`https://${t}/${s}/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}${i}${n}`},Instafeed.prototype.I=function(e,t){return e.replace(/{{([\w[\].]+)}}/g,((e,i)=>{const n=this.S(t,i);return null!==n?n:""}))},Instafeed.prototype.S=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.o=function(e){return parseInt(e)>0},Instafeed.prototype.l=function(e,t=!1){return t&&e>768?6:e<480?2:e<768?3:e<1024?4:e<=1200?5:6},Instafeed.prototype.$=function(e){return e&&(e=e.replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'")),e},Instafeed.prototype.A=function(e,t){const i=["k","M","G","T","P","E","Z","Y"];for(let n=i.length-1;n>=0;n--){const s=Math.pow(1e3,n+1);if(e<=-s||e>=s)return+(e/s).toFixed(t)+i[n]}return e},Instafeed.prototype.T=function(e){return new Date(1e3*e).toLocaleDateString(navigator.language,{month:"long",day:"numeric"})},Instafeed.prototype.u=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: 1024px)").matches},Instafeed.prototype.i=function(e,t){0===t.clientWidth?setTimeout((()=>{e.i(e,t)}),100):e.run()},Instafeed.prototype.t=function(){if(window.instafeedCssLoaded)return;if(document.currentScript&&!document.currentScript.src.includes(e))return!1;const i=document.createElement("link");i.href=`https://${t}/cdn/${d}-${n}.css`,i.type="text/css",i.rel="stylesheet",i.media="screen,print",document.head.appendChild(i),window.instafeedCssLoaded=!0},Instafeed.prototype.P=function(){if(instafeedPopupsPreloaded)return!1;if(this.F())return!1;instafeedPopupsPreloaded=!0;const e=new IntersectionObserver(((e,t)=>{e.forEach((e=>{e.isIntersecting&&(this.L(),t.unobserve(e.target))}))}),{threshold:.1}),t=document.querySelector("#insta-feed, .instafeed-shopify");t&&e.observe(t)},Instafeed.prototype.F=function(){if("connection"in navigator&&navigator.connection){const e=navigator.connection;if(!0===e.saveData)return!0;if("effectiveType"in e&&["slow-2g","2g","3g"].includes(e.effectiveType))return!0;if("downlink"in e&&"number"==typeof e.downlink&&e.downlink<1)return!0}return!1},Instafeed.prototype.L=function(){const e=document.querySelectorAll("div.lightbox-instagram");let t=0;e.forEach((e=>{let i=0;e.querySelectorAll("video, img").forEach((e=>{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(d+"-lazy-image--handled"))}}),t),t+=200+i,i+=50}))}))},Instafeed.prototype.G=function(){const e=document.querySelectorAll("."+d+"-lazy-image");if(!e.length||!("IntersectionObserver"in window))return void e.forEach((e=>this.B(e)));const t=new IntersectionObserver(((e,t)=>{e.forEach((e=>{e.isIntersecting&&(this.U(),t.unobserve(e.target),this.B(e.target))}))}),{rootMargin:"100px 0px",threshold:.01});e.forEach((e=>{e.classList.contains(d+"-lazy-image--handled")||t.observe(e)}))},Instafeed.prototype.B=function(e){const t=e.dataset.instafeedSrc;e.classList.contains(d+"-lazy-image--handled")||(e.classList.add(d+"-lazy-image--handled"),e.onerror=()=>{e.classList.remove(d+"-lazy-image--handled")},e.src=t)},Instafeed.prototype.R=function(){const e=parseInt(this.options.autoplay);this.Y();const t=e=>e?.play(),i=e=>document.getElementById(`inline-video-${e}-${this.options.target}`),n={threshold:.01},s=document.querySelectorAll("video[data-poster]");let a=new IntersectionObserver((e=>{e.forEach((e=>{if(e.isIntersecting){this.U();let t=e.target,i=t.getAttribute("data-poster");t.setAttribute("poster",i),a.unobserve(t)}}))}),n);s.forEach((e=>{a.observe(e)}));const o="undefined"!=typeof Shopify&&Shopify?.designMode&&navigator.userAgent.includes("Shopify Mobile");if(1===e&&this.o(this.options.charge)&&!o){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))}))}),n);e.forEach((e=>i.observe(e)))}if(2===e&&this.o(this.options.charge)&&!o){let e=document.querySelectorAll(`.${d}-hover-layer[data-feed-id='${this.options.feedId}-video'], .${d}-overlay[data-feed-id='${this.options.feedId}-video']`);e&&0!==e.length||(e=document.querySelectorAll(`.${d}-new-layout-item-container`)),e.forEach((e=>{e.style.opacity="1",e.style.background="transparent"})),e.forEach((e=>{const n=n=>{const s=e.getAttribute(`data-${d}-open-id`).split("-")[0],a=i(s);var o;n?(t(a),e.style.opacity=0):(o=a,o?.pause(),e.style.opacity=1)};p.addListener(e,"mouseover",(()=>n(!0))),p.addListener(e,"mouseout",(()=>n(!1))),p.addListener(e,"touchstart",(()=>n(!0))),p.addListener(e,"touchend",(()=>n(!1)))}))}},Instafeed.prototype.Y=function(){Array.from(document.querySelectorAll('video[id^="video-"]')).filter((e=>e.id.includes(this.options.target))).forEach((e=>{e.onplay=()=>{e.muted=!instafeedSettings.sound,e.id.split("-").pop(),null===instafeedSettings.modalOpen&&e.pause()}}))},Instafeed.prototype.U=function(){if(instafeedSettings.feedViewed?.[this.options.feedId])return!1;instafeedSettings.feedViewed[this.options.feedId]=!0,instafeedEventTag("feed_view",this.options.feedId)},Instafeed}();!function e(){function t(e,t=!1){const n=document.getElementById(e);if(n){let e=document.getElementById("video-"+i);e&&e.pause(),n.style.setProperty("display","none","important"),n.style.opacity=0,t||document.body.classList.remove("instafeed-body-no-scroll"),instafeedSettings.modalOpen=null,instafeedSettings.previouslyFocusedElement&&instafeedSettings.previouslyFocusedElement.focus(),p.removeListener(window,"keydown",instafeedTrapFocusHandler,!1),p.removeListener(document.body,"touchmove",instafeedTouchScrollListener,{passive:!1})}}var i;p.addListener(document,"click",(function(e){var n,s;if(!e.target||!e.target.hasAttribute(`data-${d}-open-id`)&&!e.target.hasAttribute(`data-${d}-close-id`))return!1;if(n=e.target.hasAttribute(`data-${d}-open-id`)?e.target.getAttribute(`data-${d}-open-id`):e.target.getAttribute(`data-${d}-close-id`),s=document.getElementById("video-"+n),e.target.hasAttribute(`data-${d}-open-id`)){const e=document.getElementById(n);if(document.activeElement.classList.contains(`${d}-new-layout-item-container`)&&(instafeedSettings.previouslyFocusedElement=document.activeElement),e){let i=!1;if(instafeedSettings.modalOpen&&(i=!0,t(instafeedSettings.modalOpen,i)),instafeedSettings.modalOpen=n,e.style.setProperty("display","flex","important"),i?e.style.opacity=1:requestAnimationFrame((()=>{e.style.opacity=1})),document.body.classList.add("instafeed-body-no-scroll"),e.querySelector(".instafeed-simple-popup")&&p.addListener(document.body,"touchmove",instafeedTouchScrollListener,{passive:!1}),s){const e=document.getElementById("video-spinner-"+n);e.style.display="block",s.play().then((()=>{e.style.display="none"}))}(function a(e){let t=`.${d}-new-arrow, .${d}-close-button`;window.matchMedia("only screen and (max-width: 1024px)").matches&&(t=`.${d}-close-button, .tagged-buy-button, .${d}-sound-button, .${d}-post-control-button`);const{firstFocusableElement:i,lastFocusableElement:n}=function s(e,t){const i=e.querySelectorAll(t);return{firstFocusableElement:i[0],lastFocusableElement:i[i.length-1]}}(e,t);instafeedTrapFocusHandler=e=>{!function t(e,i,n){("Tab"===e.key||9===e.keyCode)&&(e.shiftKey?e.target===i&&(n.focus(),e.preventDefault()):e.target===n&&(i.focus(),e.preventDefault()))}(e,i,n)},p.addListener(window,"keydown",instafeedTrapFocusHandler,!1),i&&i.focus()})(e),instafeedEventTag("modal_open",0)}}e.target.hasAttribute(`data-${d}-close-id`)&&t(n),i=n})),p.addListener(window,"keydown",(e=>{var i,n,s;const{key:a}=e;if(!document.getElementById("video-"+instafeedSettings.modalOpen)||" "!==a&&"Spacebar"!==a&&"Space"!==e.code||"INPUT"===e.target.tagName||"TEXTAREA"===e.target.tagName||(e.preventDefault(),instafeedTogglePlay()),"Escape"===a)instafeedSettings.modalOpen&&t(instafeedSettings.modalOpen);else if("Enter"===e.key){const e=document.activeElement;("dialog"===e.getAttribute("aria-haspopup")||e.classList.contains(`${d}-post-control-button`)||e.classList.contains(`${d}-sound-button`)||e.classList.contains(`${d}-video-control`)||e.classList.contains(`${d}-close-button`)||e.classList.contains(`${d}-carousel-arrow`)||e.classList.contains(`${d}-new-arrow`))&&e.click()}(i=document.getElementById(instafeedSettings.modalOpen))&&(n="","ArrowLeft"===a?n=`.${d}-new-arrow.prev`:"ArrowRight"===a&&(n=`.${d}-new-arrow.next`),n&&(s=i.querySelector(n))&&s.click())}))}(),function e(){window.instafeedEventTag=function(e,t){if("undefined"==typeof Shopify||!1===instafeedSettings.analyticsViewsClicks)return;const i={event:e,fid:t,shop:Shopify.shop,appVersion:n};fetch("https://tr.nfcube.com/index/v1",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(i)}).catch((e=>console.error("Error:",e)))}}(),function e(){window.instafeedAddToCart=(e,t,i,n)=>{const s=e.querySelector("button");s.innerHTML='
';const a=function o(e,t){let i=e.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=e=>{e.stopPropagation(),e.preventDefault(),window.location.href="/cart"},"instafeed-simple-popup"===t){const t=e.closest(".instafeed-simple-popup-product-list");t&&t.insertAdjacentElement("beforebegin",i)}else e.appendChild(i);return i}(e,n),d={items:[{id:t,quantity:1}]};fetch(window.Shopify.routes.root+"cart/add.js",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(d)}).then((e=>{if(!e.ok)throw new Error("Network response was not ok");return e.json()})).then((()=>{fetch(window.Shopify.routes.root+"cart.js").then((e=>e.json())).then((e=>{a.setAttribute("data-count",e.item_count),a.style.display="flex",s.innerHTML=i})).catch((e=>{console.error("Error:",e),s.innerHTML=i}))})).catch((e=>{console.error("Error:",e),s.innerHTML=i}))}}(),function e(){window.instafeedToggleSound=e=>{var t=e.getAttribute("data-video-id"),i=document.getElementById(t);i.muted=!i.muted,instafeedSettings.sound=!i.muted,document.querySelectorAll(".instafeed-sound-button").forEach((function(e){e.classList.toggle("sound-on"),e.setAttribute("aria-label",i.muted?"Mute":"Unmute")}))}}(),function e(){window.instafeedTogglePlay=()=>{const e="video-"+instafeedSettings.modalOpen,t=document.getElementById(e),i=document.querySelector(`.instafeed-video-control[data-video-id="${e}"]`);t.paused?(t.play(),i.setAttribute("aria-label","Play"),i.classList.remove("paused")):(t.pause(),i.setAttribute("aria-label","Pause"),i.classList.add("paused"))}}(),function e(){window.instafeedCarouselArrow=function(e,t,i,n){const s=instafeedSettings.carousels[t][i],a=s.length,o=e.closest("div.instafeed-post-image");if(o){const e=o.querySelector("img");if(e&&a>0){const o=e.src;let d=s.indexOf(o);-1===d&&(d=0),d="left"===n?0===d?a-1:d-1:d===a-1?0:d+1,document.getElementById(`instafeed-carousel-dots-${t}-${i}`)?.querySelector(".instafeed-carousel-dot.active")?.classList.remove("active"),document.getElementById(`instafeed-carousel-dot-${t}-${i}-${d}`)?.classList.add("active"),e.src=s[d]}}}}(),function e(){window.instafeedSliderMove=(e,t=0)=>{instafeedSettings.sliderState[t]||(instafeedSettings.sliderState[t]={currentTransform:0,minTransform:0});const i=instafeedSettings.sliderState[t],n=Math.ceil(instafeedSettings.totalImages[t]/instafeedSettings.sliderNumVisibleImages[t])-1,s=parseFloat(instafeedSettings.sliderRowSize[t]*n).toFixed(3);i.currentTransform+=e*-instafeedSettings.sliderStepSize[t],i.currentTransform=parseFloat(i.currentTransform.toFixed(3)),i.currentTransform<-s&&(i.currentTransform=i.minTransform),i.currentTransform>i.minTransform&&(i.currentTransform=-s);const a=document.querySelector(`.${d}-new-layout-wrapper[data-feed-id="${t}"]`);let o=i.currentTransform;"rtl"===document.documentElement.dir&&"81c182-2.myshopify.com"!==(this.options&&this.options.shopOrigin||"undefined"!=typeof Shopify&&Shopify.shop)&&(o=Math.abs(i.currentTransform)),a&&(a.style.transform=`translateX(${o}px)`)}}(),window.instafeedSettings={},instafeedSettings.version=n,instafeedSettings.sound=!1,instafeedSettings.analyticsViewsClicks=!1,instafeedSettings.modalOpen=null,instafeedSettings.feedViewed={},instafeedSettings.previouslyFocusedElement=null,instafeedSettings.carousels={},instafeedSettings.sliderRowSize={},instafeedSettings.sliderStepSize={},instafeedSettings.sliderNumVisibleImages={},instafeedSettings.sliderState={},instafeedSettings.totalImages={},window.instafeedFeedsLoaded=window.instafeedFeedsLoaded||[],window.instafeedCssLoaded=window.instafeedCssLoaded||!1,window.instafeedScrollIntervals=window.instafeedScrollIntervals||{},window.instafeedSlideSpeed=window.instafeedSlideSpeed||6e3,window.instafeedPopupsPreloaded=window.instafeedPopupsPreloaded||!1,window.instafeedTrapFocusHandler=window.instafeedTrapFocusHandler||!1,window.instafeedTouchScrollListener=window.instafeedTouchScrollListener||function(e){e.preventDefault()},function(e,t){"use strict";function i(e,i,n){for(;e&&e!==t.documentElement;){var s=e.getAttribute(i);if(s)return s;e=e.parentNode}return n}"function"!=typeof e.CustomEvent&&(e.CustomEvent=function(e,i){i=i||{bubbles:!1,cancelable:!1,detail:void 0};var n=t.createEvent("CustomEvent");return n.initCustomEvent(e,i.bubbles,i.cancelable,i.detail),n},e.CustomEvent.prototype=e.Event.prototype),t.addEventListener("touchstart",(function(e){"true"!==e.target.getAttribute("data-swipe-ignore")&&(r=e.target,d=Date.now(),n=e.touches[0].clientX,s=e.touches[0].clientY,a=0,o=0,l=e.touches.length)}),!1),t.addEventListener("touchmove",(function(e){if(n&&s){var t=e.touches[0].clientX,i=e.touches[0].clientY;a=n-t,o=s-i}}),!1),t.addEventListener("touchend",(function(e){var c,u,p,h,f,g,m;r===e.target&&(c=parseInt(i(r,"data-swipe-threshold","20"),10),u=i(r,"data-swipe-unit","px"),p=parseInt(i(r,"data-swipe-timeout","500"),10),h=Date.now()-d,f="",g=e.changedTouches||e.touches||[],"vh"===u&&(c=Math.round(c/100*t.documentElement.clientHeight)),"vw"===u&&(c=Math.round(c/100*t.documentElement.clientWidth)),Math.abs(a)>Math.abs(o)?Math.abs(a)>c&&h0?"swiped-left":"swiped-right"):Math.abs(o)>c&&h0?"swiped-up":"swiped-down"),""!==f&&(m={dir:f.replace(/swiped-/,""),touchType:(g[0]||{}).touchType||"direct",fingers:l,xStart:parseInt(n,10),xEnd:parseInt((g[0]||{}).clientX||-1,10),yStart:parseInt(s,10),yEnd:parseInt((g[0]||{}).clientY||-1,10)},r.dispatchEvent(new CustomEvent("swiped",{bubbles:!0,cancelable:!0,detail:m})),r.dispatchEvent(new CustomEvent(f,{bubbles:!0,cancelable:!0,detail:m}))),n=null,s=null,d=null)}),!1);var n=null,s=null,a=null,o=null,d=null,r=null,l=0}(window,document);if (document.getElementById('insta-feed') !== null) { var feed = new Instafeed({"account":"elmundodelauramedellin","hash":"cbca9b468dfa6d31dcd0790ddba023e8","key":"instafeed-24d8c826191b432b5123b590bbd527d9","apiVersion":6,"shopOrigin":"el-mundo-de-laura-store.myshopify.com","title":"","openIg":3,"space":5,"corners":12,"likes":0,"showFollowers":0,"showProducts":0,"layout":6,"format":0,"sliderBehavior":1,"instagramLinks":0,"loadingAnimation":0,"showPrices":0,"showReviews":0,"viewsAndClicks":0,"addToCart":0,"filter":"","taggedPosts":0,"columns":4,"columnsMobile":4,"rows":3,"rowsMobile":3,"autoplay":0,"autoLayout":1,"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()});