text: (()=>{function t(t,n){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,n){if(!t)return;if("string"==typeof t)return e(t,n);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return e(t,n)}(t))||n&&t&&"number"==typeof t.length){r&&(t=r);var o=0,a=function(){};return{s:a,n:function(){return o>=t.length?{done:!0}:{done:!1,value:t[o++]}},e:function(t){throw t},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,c=!0,s=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return c=t.done,t},e:function(t){s=!0,i=t},f:function(){try{c||null==r.return||r.return()}finally{if(s)throw i}}}}function e(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}window.App={init:function(){$("#form-newsletter").on("submit",(function(t){t.preventDefault(),$.ajax({type:"POST",url:urlAjaxHandler+"/api/newsletter",data:$("#form-newsletter").serialize(),dataType:"json",success:function(t){var e="";"OK"==t.status?e+=t.msg:$.each(t.errors,(function(t,n){e+="<h4>"+n[0]+"</h4>"})),bootbox.alert({title:"Newsletter",message:e})},error:function(t){var e=t.responseJSON,n="";$.each(e.errors,(function(t,e){n+="<h4>"+e[0]+"</h4>"})),bootbox.alert({title:"Newsletter",message:n})}})})),$().fancybox({selector:".lightbox"}),$(".lightbox-iframe").fancybox({type:"iframe",iframe:{css:{width:"800px"}}}),$(document).on("click",".scroll-to",(function(t){t.preventDefault(),App.scrollTo($(this).attr("href"))})),window.location.hash&&App.scrollTo(window.location.hash)},scrollTo:function(t){var e=$("nav").outerHeight(),n=$(t).offset().top;$("html, body").stop().animate({scrollTop:n-e},500)},formValidation:function(t){$("#"+t).submit((function(e){e.preventDefault(),$.ajax({type:"POST",url:urlAjaxHandler+"/api/"+t,data:$("#"+t).serialize(),dataType:"json",success:function(e){"ok"==e.status?($("#"+t).hide(),$("#response").show().text(e.msg)):($.each(e.errors,(function(t,e){$('[name="'+t+'"]').addClass("error")})),$("html, body").animate({scrollTop:$("#"+t).offset().top-$("nav").height()},1200,"swing"))}})}))},validateCaptcha:function(t,e,n){var r=!1,o=!1,a=$(n);a.on("submit",(function(n){return!o&&(!!r||(n.preventDefault(),a.find('input[name="captcha_token"]').remove(),a.find('input[name="captcha_action"]').remove(),void(a.get(0).reportValidity()&&(o=!0,grecaptcha.ready((function(){grecaptcha.execute(t,{action:e}).then((function(t){r=!0,o=!1,a.append('<input type="hidden" name="captcha_token" value="'+t+'">').append('<input type="hidden" name="captcha_action" value="'+e+'">').trigger("submit")}))}))))))}))}},window.trans=function(e){var n,r=e.split("."),o=JS_LOCALIZATION,a=t(r);try{for(a.s();!(n=a.n()).done;){var i=n.value;i in o&&(o=o[i])}}catch(t){a.e(t)}finally{a.f()}return"string"==typeof o?o:e};var n=Swal.mixin({toast:!0,position:"top-right",iconColor:"green",customClass:{popup:"colored-toast"},showConfirmButton:!1,timer:1500,timerProgressBar:!0});window.sendOrderNotification=function(t){var e="".concat(window.urlAjaxHandler,"/api/store/resend-order-notification/").concat(t);axios.get(e).then((function(t){var e=t.data;n.fire({icon:e.msg.type,title:e.msg.text})}),(function(t){console.log(t)}))}})();