var instafeedApp = (function instafeedLoad(){const appDomain="instafeed.nfcube.com",appCdn="cdn.nfcube.com",cssVer="7.5.1",debugMode=!1;var Instafeed=function(){function a(a){this.options={target:"insta-feed",forceUpdate:!1,picturesLoaded:0,picturesNeeded:0,admin:window.location.hostname===appDomain},Object.assign(this.options,a),this._loadCss()}return a.prototype.run=function(){var a=document.getElementById(this.options.target);if(0===a.clientWidth&&0Hang on we are processing your feed \u2615":"";a.innerHTML=`loading bar${b}`;const c=this;return fetch(this._buildUrl()).then(a=>{if(!a.ok)throw new Error(`HTTP error: ${a.status} ${a.statusText}`);return a.json()}).then(a=>{c.parse(a)}).catch(a=>{console.log("Error:",a.message)}),!0},a.prototype.parse=function(a){var b,c,d,e,f,g,h,j,k,l,m;if(m=document.getElementById(this.options.target),"object"!=typeof a)throw new Error("Invalid JSON response");if(m.innerHTML="",204===parseInt(a.meta.code))return this.options.admin&&(m.innerHTML=a.meta.error_message),console.log("Error from API: "+a.meta.error_message),!1;if(200!==a.meta.code)return this.options.admin&&(m.innerHTML=" \u26A0\uFE0F Your Instagram account is not properly connected: "+a.meta.error_message+"

Reconnect your Instagram account and confirm you provide permissions",this.options.error.call(this,"No connection")),!1;if(null!==this.options.success&&"function"==typeof this.options.success&&this.options.success.call(this,a),"undefined"==typeof document||null===document)return!1;k=a.data,c="",d="",j="";var n=parseInt(100-this.options.space),o=0,p=0;o=0{{likes}}",r=" {{likes}} ");var s,t="
"+q+"
",u="
{{containerContent}}"+t+"
",v="",w="";for(1===parseInt(this.options.openIg)?u=""+u+"":3===parseInt(this.options.openIg)&&(this.options.admin&&(w="
"),u=""+u+"",v="
"),e=0,l=k.length;e{B?(z=""+a.title+"
Delete
",A="product image"):(z=""+a.title+"",A="product image"),x+="
"+A+"
"+z+"
"})}var E="";"video"===f.type&&f.hasOwnProperty("videos")?(E="instafeed-video",imageFullHtml=""):imageFullHtml="Instagram post with the caption: "+this._escapeHtml(this._getObjectProperty(f,"caption.text").substring(0,64))+"...",s="video"===f.type&&1===parseInt(this.options.autoplay)?"":"Instagram post with the caption: "+this._escapeHtml(this._getObjectProperty(f,"caption.text").substring(0,64))+"...";var F=1===this.options.picturesLoaded?this.options.picturesNeeded:this.options.picturesLoaded-1,G=this.options.picturesLoaded===this.options.picturesNeeded?1:this.options.picturesLoaded+1;if(h=this._makeTemplate(u,{model:f,id:this.options.picturesLoaded,fullId:f.id,minusId:F,plusId:G,link:f.link,image:g.url,video:E,username:f.user.username,fullName:f.user.full_name,userPicture:5===this.options.apiVersion?f.user.profile_picture:"https://instafeed.nfcube.com/assets/img/logo-instagram-transparent.png",imageFullHtml:imageFullHtml,taggedProduct:x,containerContent:s,date:this._timeConverter(f.created_time),caption:this._escapeHtml(this._getObjectProperty(f,"caption.text")),likes:this._shortenLargeNumber(f.likes.count,1),comments:this._shortenLargeNumber(f.comments.count,1),location:this._getObjectProperty(f,"location.name")}),j=this._makeTemplate(v,{model:f,id:this.options.picturesLoaded,fullId:f.id,minusId:F,plusId:G,link:f.link,image:g.url,video:E,username:f.user.username,fullName:f.user.full_name,userPicture:5===this.options.apiVersion?f.user.profile_picture:"https://instafeed.nfcube.com/assets/img/logo-instagram-transparent.png",imageFullHtml:imageFullHtml,taggedProduct:x,date:this._timeConverter(f.created_time),caption:this._escapeHtml(this._getObjectProperty(f,"caption.text")),likes:this._shortenLargeNumber(f.likes.count,1),comments:this._shortenLargeNumber(f.comments.count,1),location:this._getObjectProperty(f,"location.name")}),1===parseInt(this.options.layout)||3===parseInt(this.options.layout)){var H=0;H=0"),h=a+""+h+""}if(c+=h,d+=j,this.options.picturesLoaded>=this.options.picturesNeeded||a.data.length===this.options.picturesLoaded){(1===parseInt(this.options.layout)||3===parseInt(this.options.layout))&&a.data.length>H&&(c+="",c+="",c+=""),c+=d;break}}const J=document.createElement("div");J.innerHTML=c;const K=document.createDocumentFragment();Array.from(J.childNodes).forEach(a=>K.appendChild(a)),m.innerHTML="";const L=this._validateCharge(this.options.charge)&&5===this.options.apiVersion&&0${this._shortenLargeNumber(y)} followers`:"";if(0a?2:768>a?3:1024>a?4:1200>=a?5:6},a.prototype._escapeHtml=function(a){return a&&(a=a.replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'")),a},a.prototype._shortenLargeNumber=function(a,b){const c=["k","M","G","T","P","E","Z","Y"];for(let d=c.length-1;0<=d;d--){const e=Math.pow(1e3,d+1);if(a<=-e||a>=e)return+(a/e).toFixed(b)+c[d]}return a},a.prototype._timeConverter=function(a){const b=new Date(1e3*a),c=b.toLocaleDateString(navigator.language,{month:"long",day:"numeric"});return c},a.prototype._isMobileDevice=function(){return window.matchMedia("only screen and (max-width: 760px)").matches},a.prototype._checkClientWidth=function(a,b){0===b.clientWidth?setTimeout(()=>{a._checkClientWidth(a,b)},100):a.run()},a.prototype._loadCss=function(){if(document.currentScript&&!document.currentScript.src.includes(appCdn)&&!document.currentScript.src.includes(appDomain))return!1;const a=document.createElement("link");a.href=`https://${appDomain}/cdn/instafeed-${cssVer}.css`,a.type="text/css",a.rel="stylesheet",a.media="screen,print",document.head.appendChild(a)},a.prototype._enableLazyLoading=function(){function a(a){return new Promise((b,c)=>{const d=new Image;d.src=a,d.onload=b,d.onerror=c})}function b(b){const c=b.dataset.src;return c.includes("https://")?a(c).then(()=>{d(b,c)}).catch(a=>{console.log(a)}):void 0}function c(a){0===g&&f.disconnect(),a.forEach(a=>{0{a.classList.contains("js-lazy-image--handled")||f.observe(a)})):function(a){a.forEach(a=>b(a))}(e)},a.prototype._observeAndPlayVideos=function(){const a=document.querySelectorAll(".auto-loop-videos");if(!("IntersectionObserver"in window))return void console.warn("IntersectionObserver not supported. Videos will not autoplay.");const b=new IntersectionObserver((a,b)=>{a.forEach(a=>{if(a.isIntersecting){const c=a.target;c.play(),b.unobserve(c)}})},{threshold:.5});a.forEach(a=>b.observe(a))},a}();(function(a,b){a.Instafeed=b()})(this,function(){return Instafeed}),function(){function a(a,b,c){debugMode&&console.log("Trap focus inside modal");let d="Tab"===a.key||9===a.keyCode;d&&(a.shiftKey?document.activeElement===b&&(c.focus(),a.preventDefault()):document.activeElement===c&&(b.focus(),a.preventDefault()))}function b(a,b){const c=a.querySelectorAll(b),d=c[0],e=c[c.length-1];return{firstFocusableElement:d,lastFocusableElement:e}}function c(a){return`video-${a.substring(a.lastIndexOf("#")+1,a.indexOf("-"))}-instafeed`}function d(d,j){const k=location.hash.split("!").pop().replace("/",""),l=document.getElementById(c(d)),m=document.getElementById(c(k));if(m&&(m.onplay=()=>{debugMode&&console.log(`Video started playing: ${k}`),"#_"===k&&(debugMode&&console.log(`Pausing video started late: ${k}`),m.pause())}),l&&(debugMode&&console.log("Pausing video closed"),l.pause()),"#_"===k||0===k.length){if(i){debugMode&&console.log("Scroll to: "+i.y);const a=window.innerHeight;window.scrollTo(0,i.y-a/2)}document.body.style.overflowY="visible",g&&(!0===f&&(g.style.webkitTransform="translate3d(0, 0, 0)"),g.style.overflowY="visible"),document.removeEventListener("keydown",e,!1),debugMode&&console.log("Event listener for keydown has been removed.")}else if(k.includes("-feed")){const c=document.querySelector("[id='"+k.substring(1)+"']"),{firstFocusableElement:d,lastFocusableElement:h}=b(c,"#close-button-url, .follow");if(e=b=>{a(b,d,h)},debugMode&&console.log("Event listener for keydown has been added."),document.addEventListener("keydown",e,!1),m&&(debugMode&&console.log("Video force play: "+k),m.play()),g){const a=getComputedStyle(g);"none"!==a.webkitTransform&&(g.style.webkitTransform="initial",f=!0),g.style.overflowY="hidden"}document.body.style.overflowY="hidden"}i=j,h=k}var e,f=!1,g=document.getElementById("PageContainer"),h="";let i,j=null;document.addEventListener("click",a=>{const b=a.pageX,c=a.pageY;j={x:b,y:c},debugMode&&console.log(`Clicked at position x: ${b}, y: ${c}`)}),window.addEventListener("hashchange",()=>{d(h,j)},!1),window.addEventListener("keydown",a=>{const b=a.key;"Escape"===b&&location.hash.includes("-feed")&&(window.location.hash="#_")})}(),function(){window.instafeedSlidePage=1,window.instafeedSlide=(a=0)=>{instafeedSlidePage=parseInt(instafeedSlidePage)+parseInt(a);let b=document.body.querySelectorAll("#insta-feed");0===b.length&&(b=document.body.querySelectorAll(".instafeed-shopify")),b[0].style.padding="0 20px 0 20px";const c=document.body.querySelectorAll(".slide-page");let d=0;for(let b=0;b=instafeedSlidePage&&(instafeedSlidePage=d),instafeedSlidePage>d&&(instafeedSlidePage=1);const e=document.body.querySelectorAll(`[data-slide-page="${instafeedSlidePage}"]`);c.forEach(a=>{a.style.display="none"}),e.forEach(a=>{a.style.display="initial"})}}(),!function(b,f){"use strict";function e(b,c,d){for(;b&&b!==f.documentElement;){var a=b.getAttribute(c);if(a)return a;b=b.parentNode}return d}"function"!=typeof b.CustomEvent&&(b.CustomEvent=function(b,c){c=c||{bubbles:!1,cancelable:!1,detail:void 0};var d=f.createEvent("CustomEvent");return d.initCustomEvent(b,c.bubbles,c.cancelable,c.detail),d},b.CustomEvent.prototype=b.Event.prototype),f.addEventListener("touchstart",function(a){"true"===a.target.getAttribute("data-swipe-ignore")||(q=a.target,o=Date.now(),g=a.touches[0].clientX,j=a.touches[0].clientY,k=0,m=0)},!1),f.addEventListener("touchmove",function(a){if(g&&j){var b=a.touches[0].clientX,c=a.touches[0].clientY;k=g-b,m=j-c}},!1),f.addEventListener("touchend",function(a){if(q===a.target){var i=parseInt(e(q,"data-swipe-threshold","20"),10),l=e(q,"data-swipe-unit","px"),c=parseInt(e(q,"data-swipe-timeout","500"),10),d=Date.now()-o,n="",p=a.changedTouches||a.touches||[];if("vh"===l&&(i=Math.round(i/100*f.documentElement.clientHeight)),"vw"===l&&(i=Math.round(i/100*f.documentElement.clientWidth)),Math.abs(k)>Math.abs(m)?Math.abs(k)>i&&di&&d{instafeedApp()});