(()=>{"use strict";function e(e){return e.form?`siwg-comment-text-${new FormData(e.form).get("comment_post_ID")}`:"siwg-comment-text-0"}try{const t=document.currentScript?.dataset.siwgConfig;if(!t)throw new Error("Configuration data not found.");const o=globalThis.google?.accounts?.id;if(!o)throw new Error("Google identity services not found.");!function(t,o){const{initialize:n,prompt:i,renderButton:s}=t,{clientID:r,defaultButtonOptions:c,isExistingUserFlow:a,isPreview:g,isUserLoggedIn:l,isWPLogin:d,redirectTo:m,redirectCookieTTL:u,redirectCookieName:p,redirectCookiePath:w,shouldShowOneTapPrompt:h}=o;n({client_id:r,callback:t=>async function(t,o){const{connectNonce:n,followsPostRedirect:i,isExistingUserFlow:s,isPreview:r,isWooCommerce:c,isWPLogin:a,loginURI:g,redirectTo:l}=o;if(r)return;const d=new URLSearchParams;d.append("credential",t.credential),d.append("select_by",t.select_by),s?(d.append("integration","existing_user"),d.append("connect_nonce",n)):c&&!a&&d.append("integration","woocommerce");const m=document.getElementById("comment");m&&function(t){const o=e(t);t.value&&sessionStorage.setItem(o,t.value)}(m);try{const e=await fetch(g,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:d});l||i?e.ok&&e.redirected&&location.assign(e.url):location.reload()}catch(e){globalThis.console.error(e)}}(t,o),library_name:"Site-Kit"});const f=document.getElementById("login");if(d&&f){const e=document.createElement("div"),t=document.getElementById("loginform");e.classList.add("googlesitekit-sign-in-with-google__frontend-output-button"),e.dataset.googlesitekitSiwgWidth="320",f.insertBefore(e,t)}(!l||d||g||a)&&document.querySelectorAll(".googlesitekit-sign-in-with-google__frontend-output-button").forEach(e=>{const{googlesitekitSiwgShape:t=c.shape,googlesitekitSiwgText:o=c.text,googlesitekitSiwgTheme:n=c.theme,googlesitekitSiwgWidth:i}=e.dataset,r={shape:t,text:o,theme:n},a=Number(i);!isNaN(a)&&a>0&&(r.width=a,e.style.maxInlineSize=`${a}px`),s(e,r)}),h&&i(),m&&(document.cookie=`${p}=${m};max-age=${u};path=${w}`);const S=document.getElementById("comment");S&&function(t){const o=e(t),n=sessionStorage.getItem(o);n&&(t.value=n,sessionStorage.removeItem(o))}(S)}(o,JSON.parse(t))}catch(e){globalThis.console.error(e)}})();
var SaleBoosterPopup;!function(r){"use strict";var o,t;SaleBoosterPopup={init:function(){o={mouseover:!1,document_mouseleave:!1,in_process:!1,products:JSON.parse(r("#sales-booster-sale-popup-products").text()),i:0},r("#sales-booster-popup").length&&0<o.products.length&&(t={wrapper:r("#sales-booster-popup"),inner:r("#sales-booster-popup .sales-booster-popup-inner"),repeat_every:r("#sales-booster-popup").data("repeat-time")},this.helpers(),this.renderContentPopup(),this.closePopup())},helpers:function(){t.wrapper.off("mousedown").on("mousedown"),t.wrapper.bind("click").trigger("click")},renderProduct:function(){var e;r("html").hasClass("et-mini-content-opened")||o.mouseover||t.wrapper.hasClass("loaded")||window.navigator.onLine&&(e=r.makeArray(o.products[o.i]).map(function(e){return wp.template("sales-booster-sale-popup")(e)}).join(""),t.wrapper.addClass("loaded"),SaleBoosterPopup.audio(),t.inner.html(e),setTimeout(function(){o.mouseover||t.wrapper.removeClass("loaded")},t.repeat_every/2*1e3),o.products.length>o.i+1?o.i++:o.i=0)},renderContentPopup:function(){setInterval(SaleBoosterPopup.renderProduct,1e3*t.repeat_every);t.wrapper.on("mouseover",function(){o.mouseover=!0}).on("mouseleave",function(){o.mouseover=!1,setTimeout(function(){o.mouseover||t.wrapper.removeClass("loaded")},t.repeat_every/2*1e3)})},closePopup:function(){t.wrapper.on("click",".close",function(){t.wrapper.removeClass("loaded"),setTimeout(function(){t.wrapper.remove(),r("#sales-booster-popup-audio").remove()},t.repeat_every/2*1e3)})},audio:function(){var e,o;0<r("#sales-booster-popup-audio").length&&(e=document.getElementById("sales-booster-popup-audio"),o=function(){e.play().then(function(){setTimeout(function(){e.pause(),e.currentTime=0},0)}),document.removeEventListener("touchstart",o,!1)},document.addEventListener("touchstart",o,!1),e.play())}},r(document).ready(function(){SaleBoosterPopup.init()})}(jQuery);