"use strict";function emoImgFallingMain(e,i){var s=e;function r(){var n,e=!1,t=!1,a=!1,o=!1,i=!1,r=!1,l=!1;return-1!==s.opreateArr.indexOf(1)&&(t="/"===window.location.pathname),-1!==s.opreateArr.indexOf(2)&&(a="/shop"===window.location.pathname),-1!==s.opreateArr.indexOf(3)&&(o="/search"===window.location.pathname),-1!==s.opreateArr.indexOf(4)&&(i=!!window.location.pathname.includes("/product-page/")),-1!==s.opreateArr.indexOf(5)&&(r="/cart-page"===window.location.pathname),-1!==s.opreateArr.indexOf(6)&&(l=!("/"===window.location.pathname||("/shop"===window.location.pathname||("/search"===window.location.pathname||(!!window.location.pathname.includes("/product-page/")||"/cart-page"===window.location.pathname))))),e=t||a||o||i||r||l,-1!==s.timerObj.isOpen.indexOf(1)&&(t=function(e,t){e=Date.parse(new Date(e)),t=Date.parse(new Date(t));return parseInt((t-e)/1e3/3600/24)},o=(a=new Date).getFullYear(),i=a.getMonth(),r=a.getDate(),l=void 0,"easter"===s.theme?(n=function(e){return e<10?"0"+e:e},l=t(o+"-"+function(e){var t=Math.floor(e/100),a=e-19*Math.floor(e/19),o=Math.floor((t-17)/25),o=t-Math.floor(t/4)-Math.floor((t-o)/3)+19*a+15;o-=30*Math.floor(o/30),o-=Math.floor(o/28)*(1-Math.floor(o/28)*Math.floor(29/(1+o))*Math.floor((21-a)/11));t=e+Math.floor(e/4)+o+2-t+Math.floor(t/4),o-=t-=7*Math.floor(t/7),t=3+Math.floor((40+o)/44),o=28+o-31*Math.floor(t/4);return n(t)+"-"+n(o)}(o),o+"-"+(i+1)+"-"+r)):"thanksgiving"===s.theme?l=t(o+"-11-"+(4<(a=new Date(o+"-11-1")).getDay()?32-a.getDay()+1:0===a.getDay()?26:25-a.getDay()+1),o+"-"+(i+1)+"-"+r):"valentine"===s.theme?l=t(o+"-2-14",o+"-"+(i+1)+"-"+r):"christmas"===s.theme?l=t(o+"-12-25",o+"-"+(i+1)+"-"+r):"halloween"===s.theme&&(l=t(o+"-10-31",o+"-"+(i+1)+"-"+r)),(l<-parseInt(s.timerObj.bfDay)||l>parseInt(s.timerObj.afDay))&&(e=!1)),e}!function(){if(i){var o=document.createElement("div");o.className="antools_falling";var e=0,t=0;if("custom"!==s.theme)for(;e<30&&t<30;)s.emoSelect.forEach(function(e,t){var a=document.createElement("img");a.src="https://app.salesdish.com/static/falling_"+(s.theme+e)+".svg",a.width="40px",o.appendChild(a)}),e+=s.emoSelect.length,t++;else for(;e<30&&t<30;)s.imgList.forEach(function(e,t){var a=document.createElement("img");a.src=e.imgUrl||e,a.width="40px",o.appendChild(a)}),e+=s.imgList.length,t++;r()?o.style.display="flex":o.style.display="none";var a=250,n=void 0;!function e(){n&&clearTimeout(n);n=setTimeout(function(){a<2e3&&(a+=250),r()?o.style.display="flex":o.style.display="none",e()},a)}(),document.body.appendChild(o)}}()}!function(){var e=document.createElement("link");e.setAttribute("rel","stylesheet"),e.setAttribute("type","text/css"),e.setAttribute("href","https://wix.salesdish.com/page/css/emoImgFalling.css"),document.body.appendChild(e);e=document.querySelector("#emojis-images-falling-2003");!e||(e=e.getAttribute("src")).includes("?")&&(e=e.split("?")[1].split("=")[1],fetch("https://gateway.salesdish.com/shopify-service/app-config/pass/2003?params=Emojis%2Fimages+falling&store_id="+e+"&is_preview=1").then(function(e){return e.json()}).then(function(e){e.success&&emoImgFallingMain(JSON.parse(e.data["Emojis/images falling"]),e.is_open["Emojis/images falling"])}))}();